Commit 489d8a5c authored by Petr Ročkai's avatar Petr Ročkai
Browse files

bricks: Move brq::precondition to brick-except.

parent 64978710
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -156,6 +156,14 @@ namespace brq
                std::exit( exit_code );
        }
    };

    struct precondition_failed : std::exception {};

    inline void precondition( bool x )
    {
        if ( !x )
            throw precondition_failed{};
    }
}

// vim: syntax=cpp tabstop=4 shiftwidth=4 expandtab ft=cpp
+1 −8
Original line number Diff line number Diff line
@@ -2,19 +2,12 @@
#include <brick-assert>
#include <brick-string>
#include <brick-enumerate>
#include <brick-except>
#include <typeindex>
#include <sys/time.h>

namespace brq
{
    struct precondition_failed : std::exception {};

    inline void precondition( bool x )
    {
        if ( !x )
            throw precondition_failed{};
    }

    template< typename out_t, typename... state_t >
    struct program
    {