Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<template<typename> typename F>
- struct bool_metafunc
- {
- template<typename T>
- struct negate
- {
- static constexpr bool value = !(F<T>::value);
- };
- template<template<typename> typename Other>
- struct binary_op
- {
- template<typename T>
- struct logic_or
- {
- static constexpr bool value = F<T>::value || Other<T>::value;
- };
- template<typename T>
- struct logic_and
- {
- static constexpr bool value = F<T>::value && Other<T>::value;
- };
- };
- };
- template<typename T>
- using integr_or_float = typename mvg::bool_metafunc<std::is_integral>::binary_op<std::is_floating_point>::logic_or<T>;
Add Comment
Please, Sign In to add comment