8 #ifndef BLACKCAT_CONSTEXPRIF_H_ 9 #define BLACKCAT_CONSTEXPRIF_H_ 35 template<
bool cond,
class f1,
class f2>
37 return bc::traits::get<int(!cond)>(true_path, false_path)();
40 template<
bool Bool,
class Function>
42 return constexpr_ternary<Bool>(
function, [](){});
45 template<
bool Bool,
class F1,
class F2>
47 return constexpr_ternary<Bool>(f1, f2);
50 template<
bool Bool,
class Function>
52 return [=]() {
return constexpr_if<Bool>(
function); };
55 template<
bool Bool,
class F1,
class F2>
57 return [=]() {
return constexpr_ternary<Bool>(f1, f2); };
60 template<
class Function>
Bind< Function, Args &&... > bind(Function function, Args &&... args)
Definition: bind.h:105
auto constexpr_ternary(f1 true_path, f2 false_path)
C++ 11/14 version of constexpr if.
Definition: constexpr_if.h:36
auto constexpr_else(Function function)
Definition: constexpr_if.h:61
auto constexpr_else_if(Function function)
Definition: constexpr_if.h:51
auto constexpr_if(Function function)
Definition: constexpr_if.h:41
The Evaluator determines if an expression needs to be greedily optimized.
Definition: algorithms.h:22