void throw_if(const PredicateT& pred, const char* message) { if (pred()) { throw ExceptionT(message); } }
const ArgT& throw_if(const ArgT& arg, const PredicateT& pred, const char* message) { if (pred(arg)) { throw ExceptionT(message); } return arg; }
static void raise(ExceptionT &&exc) { // std::cout << "THROWING AN EXCEPTION: " << exc << std::endl; throw ExceptionT(std::move(exc)); }