1
0
forked from boostorg/mp11

Move everything to namespace mp11

This commit is contained in:
Peter Dimov
2017-03-15 21:23:15 +02:00
parent ac42a4b3c6
commit a231733c7e
72 changed files with 231 additions and 189 deletions

View File

@ -23,6 +23,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_assign<L1, L2> // mp_assign<L1, L2>
namespace detail namespace detail
@ -751,6 +753,7 @@ template<class L, template<class...> class P> using mp_none_of = mp_bool< mp_cou
// mp_any_of<L, P> // mp_any_of<L, P>
template<class L, template<class...> class P> using mp_any_of = mp_bool< mp_count_if<L, P>::value != 0 >; template<class L, template<class...> class P> using mp_any_of = mp_bool< mp_count_if<L, P>::value != 0 >;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_ALGORITHM_HPP_INCLUDED #endif // #ifndef BOOST_MP11_ALGORITHM_HPP_INCLUDED

View File

@ -15,6 +15,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_count<L, V> // mp_count<L, V>
namespace detail namespace detail
@ -87,6 +89,7 @@ template<template<class...> class L, class... T, template<class...> class P> str
template<class L, template<class...> class P> using mp_count_if = typename detail::mp_count_if_impl<L, P>::type; template<class L, template<class...> class P> using mp_count_if = typename detail::mp_count_if_impl<L, P>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_DETAIL_MP_COUNT_HPP_INCLUDED #endif // #ifndef BOOST_MP11_DETAIL_MP_COUNT_HPP_INCLUDED

View File

@ -10,12 +10,15 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_list<T...> // mp_list<T...>
template<class... T> struct mp_list template<class... T> struct mp_list
{ {
}; };
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_DETAIL_MP_LIST_HPP_INCLUDED #endif // #ifndef BOOST_MP11_DETAIL_MP_LIST_HPP_INCLUDED

View File

@ -12,6 +12,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_map_find // mp_map_find
namespace detail namespace detail
@ -35,6 +37,7 @@ template<template<class...> class M, class... T, class K> struct mp_map_find_imp
template<class M, class K> using mp_map_find = typename detail::mp_map_find_impl<M, K>::type; template<class M, class K> using mp_map_find = typename detail::mp_map_find_impl<M, K>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_DETAIL_MP_MAP_FIND_HPP_INCLUDED #endif // #ifndef BOOST_MP11_DETAIL_MP_MAP_FIND_HPP_INCLUDED

View File

@ -13,6 +13,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_plus // mp_plus
namespace detail namespace detail
@ -41,6 +43,7 @@ template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, c
template<class... T> using mp_plus = typename detail::mp_plus_impl<T...>::type; template<class... T> using mp_plus = typename detail::mp_plus_impl<T...>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_DETAIL_MP_PLUS_HPP_INCLUDED #endif // #ifndef BOOST_MP11_DETAIL_MP_PLUS_HPP_INCLUDED

View File

@ -15,6 +15,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_equal_to<T1, T2> // mp_equal_to<T1, T2>
template<class T1, class T2> using mp_equal_to = mp_bool< T1::value == T2::value >; template<class T1, class T2> using mp_equal_to = mp_bool< T1::value == T2::value >;
@ -75,6 +77,7 @@ template<class T1, class... T> struct mp_or_impl<T1, T...>
} // namespace detail } // namespace detail
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_FUNCTION_HPP_INCLUDED #endif // #ifndef BOOST_MP11_FUNCTION_HPP_INCLUDED

View File

@ -13,6 +13,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_bool // mp_bool
template<bool B> using mp_bool = std::integral_constant<bool, B>; template<bool B> using mp_bool = std::integral_constant<bool, B>;
@ -32,6 +34,7 @@ template<int I> using mp_int = std::integral_constant<int, I>;
// mp_size_t // mp_size_t
template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>; template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED #endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED

View File

@ -13,6 +13,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_size<L> // mp_size<L>
namespace detail namespace detail
@ -168,6 +170,7 @@ template<template<class...> class L1, class... T1, template<class...> class L2,
template<class... L> using mp_append = typename detail::mp_append_impl<L...>::type; template<class... L> using mp_append = typename detail::mp_append_impl<L...>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_LIST_HPP_INCLUDED #endif // #ifndef BOOST_MP11_LIST_HPP_INCLUDED

View File

@ -17,6 +17,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_map_contains<M, K> // mp_map_contains<M, K>
template<class M, class K> using mp_map_contains = mp_not<std::is_same<mp_map_find<M, K>, void>>; template<class M, class K> using mp_map_contains = mp_not<std::is_same<mp_map_find<M, K>, void>>;
@ -77,6 +79,7 @@ template<class M, class K> struct mp_map_erase_impl
template<class M, class K> using mp_map_erase = typename detail::mp_map_erase_impl<M, K>::type; template<class M, class K> using mp_map_erase = typename detail::mp_map_erase_impl<M, K>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_MAP_HPP_INCLUDED #endif // #ifndef BOOST_MP11_MAP_HPP_INCLUDED

View File

@ -13,6 +13,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_set_contains<S, V> // mp_set_contains<S, V>
namespace detail namespace detail
@ -76,6 +78,7 @@ template<template<class...> class L, class... U, class T1, class... T> struct mp
template<class S, class... T> using mp_set_push_front = typename detail::mp_set_push_front_impl<S, T...>::type; template<class S, class... T> using mp_set_push_front = typename detail::mp_set_push_front_impl<S, T...>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_SET_HPP_INCLUDED #endif // #ifndef BOOST_MP11_SET_HPP_INCLUDED

View File

@ -12,6 +12,8 @@
namespace boost namespace boost
{ {
namespace mp11
{
// mp_identity // mp_identity
template<class T> struct mp_identity template<class T> struct mp_identity
@ -125,6 +127,7 @@ template<template<class...> class F, class... T, class... U> struct mp_unquote_i
template<class Q, class... T> using mp_unquote = typename detail::mp_unquote_impl<Q, T...>::type; template<class Q, class... T> using mp_unquote = typename detail::mp_unquote_impl<Q, T...>::type;
} // namespace mp11
} // namespace boost } // namespace boost
#endif // #ifndef BOOST_MP11_UTILITY_HPP_INCLUDED #endif // #ifndef BOOST_MP11_UTILITY_HPP_INCLUDED

View File

@ -14,29 +14,29 @@
int main() int main()
{ {
using boost::mp_bool; using boost::mp11::mp_bool;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_bool<false>, std::integral_constant<bool, false>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_bool<false>, std::integral_constant<bool, false>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_bool<true>, std::integral_constant<bool, true>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_bool<true>, std::integral_constant<bool, true>>));
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_false, std::integral_constant<bool, false>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_false, std::integral_constant<bool, false>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_true, std::integral_constant<bool, true>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_true, std::integral_constant<bool, true>>));
using boost::mp_int; using boost::mp11::mp_int;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<0>, std::integral_constant<int, 0>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<0>, std::integral_constant<int, 0>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<814>, std::integral_constant<int, 814>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<814>, std::integral_constant<int, 814>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<-144>, std::integral_constant<int, -144>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_int<-144>, std::integral_constant<int, -144>>));
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size_t<0>, std::integral_constant<std::size_t, 0>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size_t<0>, std::integral_constant<std::size_t, 0>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size_t<1972>, std::integral_constant<std::size_t, 1972>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size_t<1972>, std::integral_constant<std::size_t, 1972>>));
using boost::mp_to_bool; using boost::mp11::mp_to_bool;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_false>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_false>, mp_false>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_true>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_true>, mp_true>));
@ -51,7 +51,7 @@ int main()
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_size_t<1>>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_size_t<1>>, mp_true>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_size_t<442>>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_to_bool<mp_size_t<442>>, mp_true>));
using boost::mp_not; using boost::mp11::mp_not;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_not<mp_false>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_not<mp_false>, mp_true>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_not<mp_true>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_not<mp_true>, mp_false>));

View File

@ -14,11 +14,11 @@
int main() int main()
{ {
using boost::mp_all; using boost::mp11::mp_all;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_all<>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_all<>, mp_true>));

View File

@ -19,10 +19,10 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_all_of; using boost::mp11::mp_all_of;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -14,11 +14,11 @@
int main() int main()
{ {
using boost::mp_and; using boost::mp11::mp_and;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_and<>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_and<>, mp_true>));

View File

@ -14,11 +14,11 @@
int main() int main()
{ {
using boost::mp_any; using boost::mp11::mp_any;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_any<>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_any<>, mp_false>));

View File

@ -19,10 +19,10 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_any_of; using boost::mp11::mp_any_of;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -22,8 +22,8 @@ struct X6 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_append; using boost::mp11::mp_append;
using L1 = mp_list<char[1], char[1]>; using L1 = mp_list<char[1], char[1]>;
using L2 = mp_list<char[2], char[2]>; using L2 = mp_list<char[2], char[2]>;

View File

@ -20,8 +20,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_assign; using boost::mp11::mp_assign;
using L1 = mp_list<int, void(), float[]>; using L1 = mp_list<int, void(), float[]>;

View File

@ -23,10 +23,10 @@ struct X5 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_at; using boost::mp11::mp_at;
using boost::mp_at_c; using boost::mp11::mp_at_c;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<X1, X2, X3, X4, X5>; using L1 = mp_list<X1, X2, X3, X4, X5>;

View File

@ -16,8 +16,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_clear; using boost::mp11::mp_clear;
using L1 = mp_list<int, void(), float[]>; using L1 = mp_list<int, void(), float[]>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_clear<L1>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_clear<L1>, mp_list<>>));

View File

@ -21,10 +21,10 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_contains; using boost::mp11::mp_contains;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -19,8 +19,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_copy_if; using boost::mp11::mp_copy_if;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -21,9 +21,9 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_count; using boost::mp11::mp_count;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -19,9 +19,9 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_count_if; using boost::mp11::mp_count_if;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -12,17 +12,21 @@
#include <boost/core/lightweight_test_trait.hpp> #include <boost/core/lightweight_test_trait.hpp>
#include <type_traits> #include <type_traits>
using boost::mp11::mp_identity;
using boost::mp11::mp_true;
using boost::mp11::mp_false;
template<class T> struct has_type template<class T> struct has_type
{ {
template<class U> static boost::mp_true f( boost::mp_identity<typename U::type>* ); template<class U> static mp_true f( mp_identity<typename U::type>* );
template<class U> static boost::mp_false f( ... ); template<class U> static mp_false f( ... );
using type = decltype( f<T>(0) ); using type = decltype( f<T>(0) );
static const auto value = type::value; static const auto value = type::value;
}; };
using boost::mp_defer; using boost::mp11::mp_defer;
template<class T> using add_pointer = T*; template<class T> using add_pointer = T*;
template<class... T> using add_pointer_impl = mp_defer<add_pointer, T...>; template<class... T> using add_pointer_impl = mp_defer<add_pointer, T...>;

View File

@ -23,10 +23,10 @@ struct X5 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_drop; using boost::mp11::mp_drop;
using boost::mp_drop_c; using boost::mp11::mp_drop_c;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -16,10 +16,10 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_empty; using boost::mp11::mp_empty;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using L1 = mp_list<>; using L1 = mp_list<>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_empty<L1>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_empty<L1>, mp_true>));

View File

@ -14,23 +14,23 @@
int main() int main()
{ {
using boost::mp_eval_if_c; using boost::mp11::mp_eval_if_c;
using boost::mp_identity; using boost::mp11::mp_identity;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if_c<true, char[], mp_identity, void, void, void>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if_c<true, char[], mp_identity, void, void, void>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if_c<false, char[], mp_identity, void()>, mp_identity<void()>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if_c<false, char[], mp_identity, void()>, mp_identity<void()>>));
using boost::mp_eval_if; using boost::mp11::mp_eval_if;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<std::true_type, char[], mp_identity, void, void, void>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<std::true_type, char[], mp_identity, void, void, void>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<std::false_type, char[], mp_identity, void()>, mp_identity<void()>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<std::false_type, char[], mp_identity, void()>, mp_identity<void()>>));
using boost::mp_int; using boost::mp11::mp_int;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_int<-7>, char[], mp_identity, void, void, void>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_int<-7>, char[], mp_identity, void, void, void>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_int<0>, char[], mp_identity, void()>, mp_identity<void()>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_int<0>, char[], mp_identity, void()>, mp_identity<void()>>));
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_size_t<14>, char[], mp_identity, void, void, void>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_size_t<14>, char[], mp_identity, void, void, void>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_size_t<0>, char[], mp_identity, void()>, mp_identity<void()>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_eval_if<mp_size_t<0>, char[], mp_identity, void()>, mp_identity<void()>>));

View File

@ -18,8 +18,8 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_fill; using boost::mp11::mp_fill;
using L1 = mp_list<int, void(), float[]>; using L1 = mp_list<int, void(), float[]>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fill<L1, X1>, mp_list<X1, X1, X1>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fill<L1, X1>, mp_list<X1, X1, X1>>));

View File

@ -21,9 +21,9 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_find; using boost::mp11::mp_find;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -19,9 +19,9 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_find_if; using boost::mp11::mp_find_if;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -22,8 +22,8 @@ template<class T1, class T2> struct F {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_fold; using boost::mp11::mp_fold;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<mp_list<>, void, F>, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<mp_list<>, void, F>, void>));
@ -41,13 +41,13 @@ int main()
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, void, F>, F<F<F<F<void, X1>, X2>, X3>, X4>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, void, F>, F<F<F<F<void, X1>, X2>, X3>, X4>>));
} }
using boost::mp_push_back; using boost::mp11::mp_push_back;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, mp_list<>, mp_push_back>, mp_list<X1, X2, X3, X4>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, mp_list<>, mp_push_back>, mp_list<X1, X2, X3, X4>>));
} }
using boost::mp_push_front; using boost::mp11::mp_push_front;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, mp_list<>, mp_push_front>, mp_list<X4, X3, X2, X1>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fold<std::tuple<X1, X2, X3, X4>, mp_list<>, mp_push_front>, mp_list<X4, X3, X2, X1>>));

View File

@ -15,9 +15,9 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_front; using boost::mp11::mp_front;
using boost::mp_first; using boost::mp11::mp_first;
using L1 = mp_list<void>; using L1 = mp_list<void>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_front<L1>, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_front<L1>, void>));

View File

@ -15,14 +15,14 @@ struct X {};
int main() int main()
{ {
using boost::mp_identity; using boost::mp11::mp_identity;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void const volatile>::type, void const volatile>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void const volatile>::type, void const volatile>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void()>::type, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<void()>::type, void()>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<int const[]>::type, int const[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<int const[]>::type, int const[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<X>::type, X>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity<X>::type, X>));
using boost::mp_identity_t; using boost::mp11::mp_identity_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void const volatile>, void const volatile>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void const volatile>, void const volatile>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void()>, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_identity_t<void()>, void()>));

View File

@ -14,22 +14,22 @@
int main() int main()
{ {
using boost::mp_if_c; using boost::mp11::mp_if_c;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if_c<true, char[], void()>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if_c<true, char[], void()>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if_c<false, char[], void()>, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if_c<false, char[], void()>, void()>));
using boost::mp_if; using boost::mp11::mp_if;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<std::true_type, char[], void()>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<std::true_type, char[], void()>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<std::false_type, char[], void()>, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<std::false_type, char[], void()>, void()>));
using boost::mp_int; using boost::mp11::mp_int;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_int<-7>, char[], void()>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_int<-7>, char[], void()>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_int<0>, char[], void()>, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_int<0>, char[], void()>, void()>));
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_size_t<14>, char[], void()>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_size_t<14>, char[], void()>, char[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_size_t<0>, char[], void()>, void()>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_if<mp_size_t<0>, char[], void()>, void()>));

View File

@ -17,7 +17,7 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_inherit; using boost::mp11::mp_inherit;
BOOST_TEST_TRAIT_TRUE((std::is_base_of<X1, mp_inherit<X1, X2, X3>>)); BOOST_TEST_TRAIT_TRUE((std::is_base_of<X1, mp_inherit<X1, X2, X3>>));
BOOST_TEST_TRAIT_TRUE((std::is_base_of<X2, mp_inherit<X1, X2, X3>>)); BOOST_TEST_TRAIT_TRUE((std::is_base_of<X2, mp_inherit<X1, X2, X3>>));

View File

@ -14,11 +14,11 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_iota; using boost::mp11::mp_iota;
using boost::mp_iota_c; using boost::mp11::mp_iota_c;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_iota_c<0>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_iota_c<0>, mp_list<>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_iota_c<1>, mp_list<mp_size_t<0>>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_iota_c<1>, mp_list<mp_size_t<0>>>));

View File

@ -17,10 +17,10 @@
int main() int main()
{ {
using boost::mp_map_contains; using boost::mp11::mp_map_contains;
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_contains<mp_list<>, char>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_contains<mp_list<>, char>, mp_false>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_contains<std::tuple<>, int>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_contains<std::tuple<>, int>, mp_false>));

View File

@ -16,8 +16,8 @@
int main() int main()
{ {
using boost::mp_map_erase; using boost::mp11::mp_map_erase;
using boost::mp_list; using boost::mp11::mp_list;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_erase<mp_list<>, void>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_erase<mp_list<>, void>, mp_list<>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_erase<std::tuple<>, int>, std::tuple<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_erase<std::tuple<>, int>, std::tuple<>>));

View File

@ -16,8 +16,8 @@
int main() int main()
{ {
using boost::mp_map_find; using boost::mp11::mp_map_find;
using boost::mp_list; using boost::mp11::mp_list;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_find<mp_list<>, char>, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_find<mp_list<>, char>, void>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_find<std::tuple<>, int>, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_find<std::tuple<>, int>, void>));

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
using boost::mp_map_insert; using boost::mp11::mp_map_insert;
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_push_back; using boost::mp11::mp_push_back;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_insert<mp_list<>, mp_list<void>>, mp_list<mp_list<void>>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_insert<mp_list<>, mp_list<void>>, mp_list<mp_list<void>>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_insert<std::tuple<>, std::tuple<int>>, std::tuple<std::tuple<int>>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_insert<std::tuple<>, std::tuple<int>>, std::tuple<std::tuple<int>>>));

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
using boost::mp_map_replace; using boost::mp11::mp_map_replace;
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_push_back; using boost::mp11::mp_push_back;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_replace<mp_list<>, mp_list<void>>, mp_list<mp_list<void>>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_replace<mp_list<>, mp_list<void>>, mp_list<mp_list<void>>>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_replace<std::tuple<>, std::tuple<int>>, std::tuple<std::tuple<int>>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_map_replace<std::tuple<>, std::tuple<int>>, std::tuple<std::tuple<int>>>));

View File

@ -15,14 +15,14 @@
#include <tuple> #include <tuple>
#include <utility> #include <utility>
using boost::mp_int; using boost::mp11::mp_int;
template<class T, class U> using inc = mp_int<U::value + 1>; template<class T, class U> using inc = mp_int<U::value + 1>;
int main() int main()
{ {
using boost::mp_map_update; using boost::mp11::mp_map_update;
using boost::mp_list; using boost::mp11::mp_list;
using M1 = mp_list<>; using M1 = mp_list<>;

View File

@ -19,10 +19,10 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_none_of; using boost::mp11::mp_none_of;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -14,11 +14,11 @@
int main() int main()
{ {
using boost::mp_or; using boost::mp11::mp_or;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_or<>, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_or<>, mp_false>));

View File

@ -19,8 +19,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_partition; using boost::mp11::mp_partition;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -15,9 +15,9 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_pop_front; using boost::mp11::mp_pop_front;
using boost::mp_rest; using boost::mp11::mp_rest;
using L1 = mp_list<void>; using L1 = mp_list<void>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L1>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_pop_front<L1>, mp_list<>>));

View File

@ -27,8 +27,8 @@ template<class T1, class T2, class T3> struct F {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_product; using boost::mp11::mp_product;
{ {
using L1 = std::tuple<X1, X2, X3>; using L1 = std::tuple<X1, X2, X3>;

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_push_back; using boost::mp11::mp_push_back;
using L1 = mp_list<>; using L1 = mp_list<>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_push_back<L1>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_push_back<L1>, mp_list<>>));

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_push_front; using boost::mp11::mp_push_front;
using L1 = mp_list<>; using L1 = mp_list<>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_push_front<L1>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_push_front<L1>, mp_list<>>));

View File

@ -11,7 +11,7 @@
#include <boost/core/lightweight_test_trait.hpp> #include <boost/core/lightweight_test_trait.hpp>
#include <type_traits> #include <type_traits>
using boost::mp_unquote; using boost::mp11::mp_unquote;
template<class...> struct X {}; template<class...> struct X {};
@ -28,8 +28,8 @@ template<class... T> using is_base_of_t = typename std::is_base_of<T...>::type;
int main() int main()
{ {
using boost::mp_identity_t; using boost::mp11::mp_identity_t;
using boost::mp_quote; using boost::mp11::mp_quote;
{ {
using Q = mp_quote<mp_identity_t>; using Q = mp_quote<mp_identity_t>;

View File

@ -19,8 +19,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_remove; using boost::mp11::mp_remove;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -19,8 +19,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_remove_if; using boost::mp11::mp_remove_if;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -18,8 +18,8 @@ template<class... T> using Y = X<T...>;
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_rename; using boost::mp11::mp_rename;
using L1 = mp_list<>; using L1 = mp_list<>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rename<L1, mp_list>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_rename<L1, mp_list>, mp_list<>>));

View File

@ -20,13 +20,13 @@ struct X2 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_repeat; using boost::mp11::mp_repeat;
using boost::mp_repeat_c; using boost::mp11::mp_repeat_c;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
using boost::mp_int; using boost::mp11::mp_int;
using boost::mp_size_t; using boost::mp11::mp_size_t;
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -20,8 +20,8 @@ struct X3 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_replace; using boost::mp11::mp_replace;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -18,8 +18,8 @@ struct X1 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_replace_if; using boost::mp11::mp_replace_if;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -25,8 +25,8 @@ struct X9 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_reverse; using boost::mp11::mp_reverse;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse<mp_list<>>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse<mp_list<>>, mp_list<>>));

View File

@ -20,13 +20,16 @@ struct X4 {};
template<class T1, class T2> struct F {}; template<class T1, class T2> struct F {};
template<class T, class L> using rev_push_back = boost::mp_push_back<L, T>; using boost::mp11::mp_push_back;
template<class T, class L> using rev_push_front = boost::mp_push_front<L, T>; using boost::mp11::mp_push_front;
template<class T, class L> using rev_push_back = mp_push_back<L, T>;
template<class T, class L> using rev_push_front = mp_push_front<L, T>;
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_reverse_fold; using boost::mp11::mp_reverse_fold;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse_fold<mp_list<>, void, F>, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_reverse_fold<mp_list<>, void, F>, void>));

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_second; using boost::mp11::mp_second;
using L1 = mp_list<void, char[]>; using L1 = mp_list<void, char[]>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L1>, char[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L1>, char[]>));

View File

@ -16,10 +16,10 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_set_contains; using boost::mp11::mp_set_contains;
using boost::mp_true; using boost::mp11::mp_true;
using boost::mp_false; using boost::mp11::mp_false;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_set_push_back; using boost::mp11::mp_set_push_back;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_set_push_front; using boost::mp11::mp_set_push_front;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_size; using boost::mp11::mp_size;
using boost::mp_size_t; using boost::mp11::mp_size_t;
using L1 = mp_list<>; using L1 = mp_list<>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size<L1>, mp_size_t<0>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_size<L1>, mp_size_t<0>>));

View File

@ -14,14 +14,14 @@
#include <type_traits> #include <type_traits>
#include <tuple> #include <tuple>
using boost::mp_bool; using boost::mp11::mp_bool;
template<class T, class U> using sizeof_less = mp_bool<(sizeof(T) < sizeof(U))>; template<class T, class U> using sizeof_less = mp_bool<(sizeof(T) < sizeof(U))>;
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_sort; using boost::mp11::mp_sort;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -23,10 +23,10 @@ struct X5 {};
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_take; using boost::mp11::mp_take;
using boost::mp_take_c; using boost::mp11::mp_take_c;
using boost::mp_size_t; using boost::mp11::mp_size_t;
{ {
using L1 = mp_list<>; using L1 = mp_list<>;

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_third; using boost::mp11::mp_third;
using L1 = mp_list<int[], void, float[]>; using L1 = mp_list<int[], void, float[]>;
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_third<L1>, float[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_third<L1>, float[]>));

View File

@ -34,8 +34,8 @@ template<class T, class U> using is_same = typename std::is_same<T, U>::type;
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_transform; using boost::mp11::mp_transform;
using L1 = mp_list<X1, X2, X3, X4>; using L1 = mp_list<X1, X2, X3, X4>;

View File

@ -20,13 +20,15 @@ struct X2 {};
struct X3 {}; struct X3 {};
struct X4 {}; struct X4 {};
using boost::mp11::mp_not;
template<class T> using add_pointer = T*; template<class T> using add_pointer = T*;
template<class T> using is_not_ref = boost::mp_not<std::is_reference<T>>; template<class T> using is_not_ref = mp_not<std::is_reference<T>>;
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_transform_if; using boost::mp11::mp_transform_if;
using L1 = mp_list<X1, X2&, X3 const, X4 const&>; using L1 = mp_list<X1, X2&, X3 const, X4 const&>;

View File

@ -15,8 +15,8 @@
int main() int main()
{ {
using boost::mp_list; using boost::mp11::mp_list;
using boost::mp_unique; using boost::mp11::mp_unique;
{ {
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_unique<mp_list<>>, mp_list<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same<mp_unique<mp_list<>>, mp_list<>>));

View File

@ -27,8 +27,8 @@ template<class T> using add_extents = T[];
int main() int main()
{ {
using boost::mp_valid; using boost::mp11::mp_valid;
using boost::mp_identity; using boost::mp11::mp_identity;
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_identity>)); BOOST_TEST_TRAIT_FALSE((mp_valid<mp_identity>));
BOOST_TEST_TRAIT_TRUE((mp_valid<mp_identity, void>)); BOOST_TEST_TRAIT_TRUE((mp_valid<mp_identity, void>));