12 template <
typename Then,
typename Else>
15 return std::forward<Then>(then);
19 template <
typename Then,
typename Else>
22 return std::forward<Else>(else_);
26 template <
bool cond,
typename Then,
typename Else>
30 std::forward<Then>(then),
31 std::forward<Else>(else_));
35 template <
bool cond,
typename Then>
41 # pragma GCC diagnostic push 42 # pragma GCC diagnostic ignored "-Wunused-parameter" 44 return static_if<cond>(std::forward<Then>(then),
45 #
if (defined __clang__ && __clang_major__ == 3 && __clang_minor__ < 6 \
46 || defined __GNUC__ && !defined __clang__ && __GNUC__ < 5)
54 # pragma GCC diagnostic pop auto static_if_impl(std::true_type, Then &&then, Else &&)
Execute the then-clause.
std::integral_constant< bool, B > bool_constant
auto static_if(Then &&then, Else &&else_)
Execute the then- or the else-clause depending on cond.