12 #ifndef BOOST_MPL11_BITWISE_HPP
13 #define BOOST_MPL11_BITWISE_HPP
24 namespace boost {
namespace mpl11 {
25 template <
typename Left,
typename Right,
typename>
26 struct Bitwise : false_ { };
28 template <
typename x1,
typename x2,
typename ...xn>
33 template <
typename x,
typename y>
36 typename datatype<typename x::type>::type,
37 typename datatype<typename y::type>::type
38 >::template bitand_impl<typename x::type, typename y::type>
42 template <
typename x1,
typename x2,
typename ...xn>
47 template <
typename x,
typename y>
50 typename datatype<typename x::type>::type,
51 typename datatype<typename y::type>::type
52 >::template bitor_impl<typename x::type, typename y::type>
56 template <
typename x1,
typename x2,
typename ...xn>
61 template <
typename x,
typename y>
64 typename datatype<typename x::type>::type,
65 typename datatype<typename y::type>::type
66 >::template bitxor_impl<typename x::type, typename y::type>
69 namespace bitwise_detail {
70 template <
typename x,
typename n>
71 struct lshift_checks {
72 static_assert(n::type::value >= 0,
73 "Invalid usage of `shift_left` with a negative shift.");
76 template <
typename x,
typename n>
77 struct rshift_checks {
78 static_assert(n::type::value >= 0,
79 "Invalid usage of `shift_right` with a negative shift.");
83 template <
typename x,
typename n>
86 Bitwise<typename datatype<typename x::type>::type>::
87 template shift_left_impl<typename x::type, n>
90 template <
typename x,
typename n>
93 Bitwise<typename datatype<typename x::type>::type>::
94 template shift_right_impl<typename x::type, n>
99 Bitwise<typename datatype<typename x::type>::type>::
100 template compl_impl<typename x::type>
104 #endif // !BOOST_MPL11_BITWISE_HPP
Bitwise left shift (<<).
Definition: bitwise.hpp:84
Defines the Integer datatype.
Bitwise right shift (>>).
Definition: bitwise.hpp:91
Bitwise and (&&).
Definition: bitwise.hpp:29
Bitwise or (||).
Definition: bitwise.hpp:43
Bitwise xor (^).
Definition: bitwise.hpp:57
Manages configurable options of the library and defines utility macros.
Forward declares the Bitwise typeclass.
Defines boost::mpl11::detail::left_folds::variadic.
#define BOOST_MPL11_IF_ASSERTIONS(...)
Macro expanding to its argument(s) if BOOST_MPL11_NO_ASSERTIONS is not defined, and to nothing otherw...
Definition: config.hpp:72
Bitwise complement (~).
Definition: bitwise.hpp:98
Recursive alias-based variadic left fold.
Definition: variadic_aliased.hpp:111
Forwards to boost/mpl11/integer.hpp.