From 8a4416f37d351a90dfde6af512a30834469cbcb2 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 12:01:26 +0100 Subject: [PATCH 01/86] Initial implementation --- CMakeLists.txt | 19 ++- include/boost/mp11/algorithm.hpp | 152 +++++++++--------- include/boost/mp11/bind.hpp | 2 + include/boost/mp11/detail/config.hpp | 6 + include/boost/mp11/detail/mp_append.hpp | 2 +- include/boost/mp11/detail/mp_copy_if.hpp | 4 +- include/boost/mp11/detail/mp_count.hpp | 6 +- include/boost/mp11/detail/mp_defer.hpp | 10 +- include/boost/mp11/detail/mp_fold.hpp | 4 +- include/boost/mp11/detail/mp_front.hpp | 2 +- include/boost/mp11/detail/mp_is_list.hpp | 2 +- .../boost/mp11/detail/mp_is_value_list.hpp | 2 +- include/boost/mp11/detail/mp_list.hpp | 3 + include/boost/mp11/detail/mp_list_v.hpp | 1 + include/boost/mp11/detail/mp_map_find.hpp | 2 +- include/boost/mp11/detail/mp_min_element.hpp | 8 +- include/boost/mp11/detail/mp_plus.hpp | 2 + include/boost/mp11/detail/mp_remove_if.hpp | 4 +- include/boost/mp11/detail/mp_rename.hpp | 6 +- include/boost/mp11/detail/mp_value.hpp | 2 + include/boost/mp11/detail/mp_void.hpp | 4 +- include/boost/mp11/detail/mp_with_index.hpp | 6 +- include/boost/mp11/function.hpp | 18 ++- include/boost/mp11/integer_sequence.hpp | 2 + include/boost/mp11/integral.hpp | 17 +- include/boost/mp11/lambda.hpp | 2 + include/boost/mp11/list.hpp | 27 ++++ include/boost/mp11/map.hpp | 2 + include/boost/mp11/mpl_tuple.hpp | 2 + include/boost/mp11/set.hpp | 2 + include/boost/mp11/tuple.hpp | 2 + include/boost/mp11/utility.hpp | 31 ++-- modules/mp11.cxx | 9 ++ 33 files changed, 230 insertions(+), 133 deletions(-) create mode 100644 modules/mp11.cxx diff --git a/CMakeLists.txt b/CMakeLists.txt index 06df6f28..be082d3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,15 +2,26 @@ # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.5...3.16) +cmake_minimum_required(VERSION 3.5...3.31) project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) -add_library(boost_mp11 INTERFACE) +if (BOOST_CXX20_MODULE) + add_library(boost_mp11) + target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES FILES modules/mp11.cxx) + target_include_directories(boost_mp11 PUBLIC include) + target_compile_features(boost_mp11 PUBLIC cxx_std_23) + set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) + target_compile_definitions(boost_mp11 PUBLIC BOOST_CXX20_MODULE) + target_compile_options(boost_mp11 PUBLIC -Wno-include-angled-in-module-purview) # TODO: scope this to clang +else() + add_library(boost_mp11 INTERFACE) + target_include_directories(boost_mp11 INTERFACE include) + target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) +endif() + add_library(Boost::mp11 ALIAS boost_mp11) -target_include_directories(boost_mp11 INTERFACE include) -target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 0f074477..0a005788 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -23,8 +23,10 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -142,13 +144,13 @@ template class F, class... L> using mp_transform = typename d #else -template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; +BOOST_MODULE_EXPORT template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; #endif #endif -template using mp_transform_q = mp_transform; +BOOST_MODULE_EXPORT template using mp_transform_q = mp_transform; namespace detail { @@ -195,8 +197,8 @@ template class P, template class F, class... L> str } // namespace detail -template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; -template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; +BOOST_MODULE_EXPORT template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; +BOOST_MODULE_EXPORT template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; // mp_filter namespace detail @@ -216,8 +218,8 @@ template class P, class L1, class... L> struct mp_filter_impl } // namespace detail -template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; -template using mp_filter_q = typename detail::mp_filter_impl::type; +BOOST_MODULE_EXPORT template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; +BOOST_MODULE_EXPORT template using mp_filter_q = typename detail::mp_filter_impl::type; // mp_fill namespace detail @@ -254,10 +256,10 @@ template class L, auto... A, class V> struct mp_fill_impl using mp_fill = typename detail::mp_fill_impl::type; +BOOST_MODULE_EXPORT template using mp_fill = typename detail::mp_fill_impl::type; // mp_contains -template using mp_contains = mp_to_bool>; +BOOST_MODULE_EXPORT template using mp_contains = mp_to_bool>; // mp_repeat(_c) namespace detail @@ -283,8 +285,8 @@ template struct mp_repeat_c_impl } // namespace detail -template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; -template using mp_repeat = typename detail::mp_repeat_c_impl::type; +BOOST_MODULE_EXPORT template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; +BOOST_MODULE_EXPORT template using mp_repeat = typename detail::mp_repeat_c_impl::type; // mp_product namespace detail @@ -320,8 +322,8 @@ template class F, class L1, class... L> struct mp_product_imp } // namespace detail -template class F, class... L> using mp_product = typename detail::mp_product_impl::type; -template using mp_product_q = typename detail::mp_product_impl::type; +BOOST_MODULE_EXPORT template class F, class... L> using mp_product = typename detail::mp_product_impl::type; +BOOST_MODULE_EXPORT template using mp_product_q = typename detail::mp_product_impl::type; // mp_drop(_c) namespace detail @@ -340,9 +342,9 @@ template class L, class... T, template class L2, cl } // namespace detail -template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; +BOOST_MODULE_EXPORT template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; -template using mp_drop = mp_drop_c; +BOOST_MODULE_EXPORT template using mp_drop = mp_drop_c; // mp_from_sequence namespace detail @@ -357,11 +359,11 @@ template class S, class U, U... J, class F> struct mp_ } // namespace detail -template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; +BOOST_MODULE_EXPORT template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; // mp_iota(_c) -template using mp_iota_c = mp_from_sequence, mp_size_t>; -template> using mp_iota = mp_from_sequence::type, N::value>, F>; +BOOST_MODULE_EXPORT template using mp_iota_c = mp_from_sequence, mp_size_t>; +BOOST_MODULE_EXPORT template> using mp_iota = mp_from_sequence::type, N::value>, F>; // mp_at(_c) namespace detail @@ -412,11 +414,11 @@ template using mp_at_c = typename detail::mp_at_c_cuda_w #else -template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; +BOOST_MODULE_EXPORT template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; #endif -template using mp_at = mp_at_c; +BOOST_MODULE_EXPORT template using mp_at = mp_at_c; // mp_take(_c) namespace detail @@ -494,18 +496,18 @@ struct mp_take_c_impl, typen } // namespace detail -template using mp_take_c = mp_assign>::type>; -template using mp_take = mp_take_c; +BOOST_MODULE_EXPORT template using mp_take_c = mp_assign>::type>; +BOOST_MODULE_EXPORT template using mp_take = mp_take_c; // mp_slice(_c) -template using mp_slice_c = mp_drop_c< mp_take_c, I >; -template using mp_slice = mp_drop< mp_take, I >; +BOOST_MODULE_EXPORT template using mp_slice_c = mp_drop_c< mp_take_c, I >; +BOOST_MODULE_EXPORT template using mp_slice = mp_drop< mp_take, I >; // mp_back -template using mp_back = mp_at_c::value - 1>; +BOOST_MODULE_EXPORT template using mp_back = mp_at_c::value - 1>; // mp_pop_back -template using mp_pop_back = mp_take_c::value - 1>; +BOOST_MODULE_EXPORT template using mp_pop_back = mp_take_c::value - 1>; // mp_replace namespace detail @@ -526,7 +528,7 @@ template class L, class... T, class V, class W> struct mp_rep } // namespace detail -template using mp_replace = typename detail::mp_replace_impl::type; +BOOST_MODULE_EXPORT template using mp_replace = typename detail::mp_replace_impl::type; // mp_replace_if namespace detail @@ -547,8 +549,8 @@ template class L, class... T, template class P, cla } // namespace detail -template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; -template using mp_replace_if_q = mp_replace_if; +BOOST_MODULE_EXPORT template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; +BOOST_MODULE_EXPORT template using mp_replace_if_q = mp_replace_if; // mp_copy_if // in detail/mp_copy_if.hpp @@ -572,7 +574,7 @@ template class L, class... T, class V> struct mp_remove_impl< } // namespace detail -template using mp_remove = typename detail::mp_remove_impl::type; +BOOST_MODULE_EXPORT template using mp_remove = typename detail::mp_remove_impl::type; // mp_remove_if // in detail/mp_remove_if.hpp @@ -588,7 +590,7 @@ template struct mp_flatten_impl } // namespace detail -template> using mp_flatten = mp_apply, L>, mp_clear>>; +BOOST_MODULE_EXPORT template> using mp_flatten = mp_apply, L>, mp_clear>>; // mp_partition namespace detail @@ -603,8 +605,8 @@ template class L, class... T, template class P> str } // namespace detail -template class P> using mp_partition = typename detail::mp_partition_impl::type; -template using mp_partition_q = mp_partition; +BOOST_MODULE_EXPORT template class P> using mp_partition = typename detail::mp_partition_impl::type; +BOOST_MODULE_EXPORT template using mp_partition_q = mp_partition; // mp_sort namespace detail @@ -648,8 +650,8 @@ template class L, class T1, class... T, template cl } // namespace detail -template class P> using mp_sort = typename detail::mp_sort_impl::type; -template using mp_sort_q = mp_sort; +BOOST_MODULE_EXPORT template class P> using mp_sort = typename detail::mp_sort_impl::type; +BOOST_MODULE_EXPORT template using mp_sort_q = mp_sort; // mp_nth_element(_c) namespace detail @@ -709,9 +711,9 @@ template class L, class T1, class... T, std::size_t I, templa } // namespace detail -template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; -template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; -template using mp_nth_element_q = mp_nth_element; +BOOST_MODULE_EXPORT template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; +BOOST_MODULE_EXPORT template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; +BOOST_MODULE_EXPORT template using mp_nth_element_q = mp_nth_element; // mp_find namespace detail @@ -790,7 +792,7 @@ template class L, class T1, class... T, class V> struct mp_fi } // namespace detail -template using mp_find = typename detail::mp_find_impl::type; +BOOST_MODULE_EXPORT template using mp_find = typename detail::mp_find_impl::type; // mp_find_if namespace detail @@ -845,8 +847,8 @@ template class L, class T1, class... T, template cl } // namespace detail -template class P> using mp_find_if = typename detail::mp_find_if_impl::type; -template using mp_find_if_q = mp_find_if; +BOOST_MODULE_EXPORT template class P> using mp_find_if = typename detail::mp_find_if_impl::type; +BOOST_MODULE_EXPORT template using mp_find_if_q = mp_find_if; // mp_reverse namespace detail @@ -923,7 +925,7 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -template using mp_reverse = typename detail::mp_reverse_impl::type; +BOOST_MODULE_EXPORT template using mp_reverse = typename detail::mp_reverse_impl::type; // mp_fold // in detail/mp_fold.hpp @@ -965,8 +967,8 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; -template using mp_reverse_fold_q = mp_reverse_fold; +BOOST_MODULE_EXPORT template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; +BOOST_MODULE_EXPORT template using mp_reverse_fold_q = mp_reverse_fold; // mp_unique namespace detail @@ -981,7 +983,7 @@ template class L, class... T> struct mp_unique_impl> } // namespace detail -template using mp_unique = typename detail::mp_unique_impl::type; +BOOST_MODULE_EXPORT template using mp_unique = typename detail::mp_unique_impl::type; // mp_unique_if namespace detail @@ -1004,22 +1006,23 @@ template class P> struct mp_unique_if_push_back } // namespace detail +BOOST_MODULE_EXPORT template class P> using mp_unique_if = mp_fold_q, detail::mp_unique_if_push_back

>; -template using mp_unique_if_q = mp_unique_if; +BOOST_MODULE_EXPORT template using mp_unique_if_q = mp_unique_if; // mp_all_of -template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; -template using mp_all_of_q = mp_all_of; +BOOST_MODULE_EXPORT template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; +BOOST_MODULE_EXPORT template using mp_all_of_q = mp_all_of; // mp_none_of -template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; -template using mp_none_of_q = mp_none_of; +BOOST_MODULE_EXPORT template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; +BOOST_MODULE_EXPORT template using mp_none_of_q = mp_none_of; // mp_any_of -template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; -template using mp_any_of_q = mp_any_of; +BOOST_MODULE_EXPORT template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; +BOOST_MODULE_EXPORT template using mp_any_of_q = mp_any_of; // mp_replace_at_c namespace detail @@ -1037,8 +1040,8 @@ template struct mp_replace_at_impl } // namespace detail -template using mp_replace_at = typename detail::mp_replace_at_impl::type; -template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; +BOOST_MODULE_EXPORT template using mp_replace_at = typename detail::mp_replace_at_impl::type; +BOOST_MODULE_EXPORT template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; //mp_for_each(f) namespace detail @@ -1078,7 +1081,7 @@ template BOOST_MP11_CONSTEXPR mp_if_c::value >= 102 #else -template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) +BOOST_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) { return detail::mp_for_each_impl( mp_rename(), std::forward(f) ); } @@ -1086,16 +1089,16 @@ template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) #endif // mp_insert -template using mp_insert = mp_append, mp_push_front, T...>>; +BOOST_MODULE_EXPORT template using mp_insert = mp_append, mp_push_front, T...>>; // mp_insert_c -template using mp_insert_c = mp_append, mp_push_front, T...>>; +BOOST_MODULE_EXPORT template using mp_insert_c = mp_append, mp_push_front, T...>>; // mp_erase -template using mp_erase = mp_append, mp_drop>; +BOOST_MODULE_EXPORT template using mp_erase = mp_append, mp_drop>; // mp_erase_c -template using mp_erase_c = mp_append, mp_drop_c>; +BOOST_MODULE_EXPORT template using mp_erase_c = mp_append, mp_drop_c>; // mp_starts_with // contributed by Glen Joseph Fernandes (glenjofe@gmail.com) @@ -1118,6 +1121,7 @@ struct mp_starts_with_impl, L2 > { } // namespace detail +BOOST_MODULE_EXPORT template using mp_starts_with = typename detail::mp_starts_with_impl::type; @@ -1136,12 +1140,12 @@ template> using mp_rotate_imp } // namespace detail -template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; -template using mp_rotate_left = mp_rotate_left_c; +BOOST_MODULE_EXPORT template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; +BOOST_MODULE_EXPORT template using mp_rotate_left = mp_rotate_left_c; // mp_rotate_right(_c) -template using mp_rotate_right_c = mp_rotate_left::value, N>>; -template using mp_rotate_right = mp_rotate_right_c; +BOOST_MODULE_EXPORT template using mp_rotate_right_c = mp_rotate_left::value, N>>; +BOOST_MODULE_EXPORT template using mp_rotate_right = mp_rotate_right_c; // mp_min_element // mp_max_element @@ -1155,7 +1159,7 @@ template struct mp_power_set_impl; } // namespace detail -template using mp_power_set = typename detail::mp_power_set_impl::type; +BOOST_MODULE_EXPORT template using mp_power_set = typename detail::mp_power_set_impl::type; namespace detail { @@ -1209,8 +1213,8 @@ template class F> struct mp_partial_sum_impl_f } // namespace detail -template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; -template using mp_partial_sum_q = mp_partial_sum; +BOOST_MODULE_EXPORT template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; +BOOST_MODULE_EXPORT template using mp_partial_sum_q = mp_partial_sum; // mp_iterate namespace detail @@ -1220,7 +1224,7 @@ template class F, template class R, class } // namespace detail -template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; +BOOST_MODULE_EXPORT template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; namespace detail { @@ -1238,7 +1242,7 @@ template class F, template class R> struct } // namespace detail -template using mp_iterate_q = mp_iterate; +BOOST_MODULE_EXPORT template using mp_iterate_q = mp_iterate; // mp_pairwise_fold namespace detail @@ -1248,8 +1252,8 @@ template using mp_pairwise_fold_impl = mp_transform_q using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; -template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; +BOOST_MODULE_EXPORT template using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; +BOOST_MODULE_EXPORT template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; // mp_sliding_fold namespace detail @@ -1275,8 +1279,8 @@ template struct mp_sliding_fold_impl using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; -template class F> using mp_sliding_fold = mp_sliding_fold_q>; +BOOST_MODULE_EXPORT template using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; +BOOST_MODULE_EXPORT template class F> using mp_sliding_fold = mp_sliding_fold_q>; // mp_intersperse namespace detail @@ -1310,7 +1314,7 @@ template class L, class T1, class... T, class S> struct mp_in } // namespace detail -template using mp_intersperse = typename detail::mp_intersperse_impl::type; +BOOST_MODULE_EXPORT template using mp_intersperse = typename detail::mp_intersperse_impl::type; // mp_split namespace detail @@ -1320,7 +1324,7 @@ template struct mp_split_impl; } // namespace detail -template using mp_split = typename detail::mp_split_impl>::type; +BOOST_MODULE_EXPORT template using mp_split = typename detail::mp_split_impl>::type; namespace detail { @@ -1336,7 +1340,7 @@ template struct mp_split_impl // mp_join -template using mp_join = mp_apply>>; +BOOST_MODULE_EXPORT template using mp_join = mp_apply>>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 289b073f..2edd5b13 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -10,7 +10,9 @@ #include #include +#ifndef BOOST_CXX20_MODULE #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index 44686c73..fe70c42a 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -146,4 +146,10 @@ # define BOOST_MP11_DEPRECATED(msg) #endif +#ifdef BOOST_CXX20_MODULE +#define BOOST_MODULE_EXPORT export +#else +#define BOOST_MODULE_EXPORT +#endif + #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED diff --git a/include/boost/mp11/detail/mp_append.hpp b/include/boost/mp11/detail/mp_append.hpp index 858ee24e..8c8b636c 100644 --- a/include/boost/mp11/detail/mp_append.hpp +++ b/include/boost/mp11/detail/mp_append.hpp @@ -307,7 +307,7 @@ struct append_value_lists #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) -template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; +BOOST_MODULE_EXPORT template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; #else diff --git a/include/boost/mp11/detail/mp_copy_if.hpp b/include/boost/mp11/detail/mp_copy_if.hpp index 4edcde09..e2e249ac 100644 --- a/include/boost/mp11/detail/mp_copy_if.hpp +++ b/include/boost/mp11/detail/mp_copy_if.hpp @@ -39,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; -template using mp_copy_if_q = mp_copy_if; +BOOST_MODULE_EXPORT template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; +BOOST_MODULE_EXPORT template using mp_copy_if_q = mp_copy_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index bc8aed93..a999078c 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -82,7 +82,7 @@ template class L, class... T, class V> struct mp_count_impl using mp_count = typename detail::mp_count_impl::type; +BOOST_MODULE_EXPORT template using mp_count = typename detail::mp_count_impl::type; // mp_count_if namespace detail @@ -138,8 +138,8 @@ template class L, class... T, template class P> str } // namespace detail -template class P> using mp_count_if = typename detail::mp_count_if_impl::type; -template using mp_count_if_q = mp_count_if; +BOOST_MODULE_EXPORT template class P> using mp_count_if = typename detail::mp_count_if_impl::type; +BOOST_MODULE_EXPORT template using mp_count_if_q = mp_count_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_defer.hpp b/include/boost/mp11/detail/mp_defer.hpp index 9aaca99e..6d5b0abf 100644 --- a/include/boost/mp11/detail/mp_defer.hpp +++ b/include/boost/mp11/detail/mp_defer.hpp @@ -33,8 +33,8 @@ template struct mp_if_c_impl } // namespace detail -template using mp_if_c = typename detail::mp_if_c_impl::type; -template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; +BOOST_MODULE_EXPORT template using mp_if_c = typename detail::mp_if_c_impl::type; +BOOST_MODULE_EXPORT template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; // mp_valid @@ -73,11 +73,11 @@ template class F, class... T> struct mp_valid_impl } // namespace detail -template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; +BOOST_MODULE_EXPORT template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; #endif -template using mp_valid_q = mp_valid; +BOOST_MODULE_EXPORT template using mp_valid_q = mp_valid; // mp_defer namespace detail @@ -109,7 +109,7 @@ template class F, class... T> using mp_defer = typename detai #else -template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; +BOOST_MODULE_EXPORT template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; #endif diff --git a/include/boost/mp11/detail/mp_fold.hpp b/include/boost/mp11/detail/mp_fold.hpp index e2c464c9..a8bba0dc 100644 --- a/include/boost/mp11/detail/mp_fold.hpp +++ b/include/boost/mp11/detail/mp_fold.hpp @@ -157,8 +157,8 @@ struct mp_fold_impl, V, F> } // namespace detail -template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; -template using mp_fold_q = mp_fold; +BOOST_MODULE_EXPORT template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; +BOOST_MODULE_EXPORT template using mp_fold_q = mp_fold; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_front.hpp b/include/boost/mp11/detail/mp_front.hpp index 53a73ac3..4a56bbc5 100644 --- a/include/boost/mp11/detail/mp_front.hpp +++ b/include/boost/mp11/detail/mp_front.hpp @@ -42,7 +42,7 @@ template class L, auto A1, auto... A> struct mp_front_impl using mp_front = typename detail::mp_front_impl::type; +BOOST_MODULE_EXPORT template using mp_front = typename detail::mp_front_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_list.hpp b/include/boost/mp11/detail/mp_is_list.hpp index 25b378bd..5eed313b 100644 --- a/include/boost/mp11/detail/mp_is_list.hpp +++ b/include/boost/mp11/detail/mp_is_list.hpp @@ -31,7 +31,7 @@ template class L, class... T> struct mp_is_list_impl> } // namespace detail -template using mp_is_list = typename detail::mp_is_list_impl::type; +BOOST_MODULE_EXPORT template using mp_is_list = typename detail::mp_is_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_value_list.hpp b/include/boost/mp11/detail/mp_is_value_list.hpp index 8f94f030..81c08023 100644 --- a/include/boost/mp11/detail/mp_is_value_list.hpp +++ b/include/boost/mp11/detail/mp_is_value_list.hpp @@ -33,7 +33,7 @@ template class L, auto... A> struct mp_is_value_list_impl using mp_is_value_list = typename detail::mp_is_value_list_impl::type; +BOOST_MODULE_EXPORT template using mp_is_value_list = typename detail::mp_is_value_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_list.hpp b/include/boost/mp11/detail/mp_list.hpp index 8e8d3e5e..87bc3af4 100644 --- a/include/boost/mp11/detail/mp_list.hpp +++ b/include/boost/mp11/detail/mp_list.hpp @@ -8,12 +8,15 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include + namespace boost { namespace mp11 { // mp_list +BOOST_MODULE_EXPORT template struct mp_list { }; diff --git a/include/boost/mp11/detail/mp_list_v.hpp b/include/boost/mp11/detail/mp_list_v.hpp index bc05238a..cf6fb1c9 100644 --- a/include/boost/mp11/detail/mp_list_v.hpp +++ b/include/boost/mp11/detail/mp_list_v.hpp @@ -15,6 +15,7 @@ namespace mp11 #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) // mp_list_v +BOOST_MODULE_EXPORT template struct mp_list_v { }; diff --git a/include/boost/mp11/detail/mp_map_find.hpp b/include/boost/mp11/detail/mp_map_find.hpp index 2fb70d8e..7e8fff47 100644 --- a/include/boost/mp11/detail/mp_map_find.hpp +++ b/include/boost/mp11/detail/mp_map_find.hpp @@ -79,7 +79,7 @@ template class M, class... T, class K> struct mp_map_find_imp } // namespace detail -template using mp_map_find = typename detail::mp_map_find_impl::type; +BOOST_MODULE_EXPORT template using mp_map_find = typename detail::mp_map_find_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_min_element.hpp b/include/boost/mp11/detail/mp_min_element.hpp index 55c21acd..24a935e7 100644 --- a/include/boost/mp11/detail/mp_min_element.hpp +++ b/include/boost/mp11/detail/mp_min_element.hpp @@ -28,8 +28,8 @@ template class P> struct select_min } // namespace detail -template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; -template using mp_min_element_q = mp_min_element; +BOOST_MODULE_EXPORT template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; +BOOST_MODULE_EXPORT template using mp_min_element_q = mp_min_element; // mp_max_element namespace detail @@ -42,8 +42,8 @@ template class P> struct select_max } // namespace detail -template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; -template using mp_max_element_q = mp_max_element; +BOOST_MODULE_EXPORT template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; +BOOST_MODULE_EXPORT template using mp_max_element_q = mp_max_element; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index 5c9417cd..46721d4c 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -9,7 +9,9 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#ifndef BOOST_CXX20_MODULE #include +#endif namespace boost { diff --git a/include/boost/mp11/detail/mp_remove_if.hpp b/include/boost/mp11/detail/mp_remove_if.hpp index 9687b4a1..4a17be8b 100644 --- a/include/boost/mp11/detail/mp_remove_if.hpp +++ b/include/boost/mp11/detail/mp_remove_if.hpp @@ -39,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; -template using mp_remove_if_q = mp_remove_if; +BOOST_MODULE_EXPORT template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; +BOOST_MODULE_EXPORT template using mp_remove_if_q = mp_remove_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_rename.hpp b/include/boost/mp11/detail/mp_rename.hpp index dde8f6f4..5bdd6f9d 100644 --- a/include/boost/mp11/detail/mp_rename.hpp +++ b/include/boost/mp11/detail/mp_rename.hpp @@ -40,13 +40,13 @@ template class L, auto... A, template class B> struc } // namespace detail -template class B> using mp_rename = typename detail::mp_rename_impl::type; +BOOST_MODULE_EXPORT template class B> using mp_rename = typename detail::mp_rename_impl::type; // mp_apply -template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; +BOOST_MODULE_EXPORT template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; // mp_apply_q -template using mp_apply_q = typename detail::mp_rename_impl::type; +BOOST_MODULE_EXPORT template using mp_apply_q = typename detail::mp_rename_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index d0e59825..88db9b7b 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -6,7 +6,9 @@ // https://www.boost.org/LICENSE_1_0.txt #include +#ifndef BOOST_CXX20_MODULE #include +#endif #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) diff --git a/include/boost/mp11/detail/mp_void.hpp b/include/boost/mp11/detail/mp_void.hpp index a7ac7b71..ad679dd0 100644 --- a/include/boost/mp11/detail/mp_void.hpp +++ b/include/boost/mp11/detail/mp_void.hpp @@ -8,6 +8,8 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include + namespace boost { namespace mp11 @@ -24,7 +26,7 @@ template struct mp_void_impl } // namespace detail -template using mp_void = typename detail::mp_void_impl::type; +BOOST_MODULE_EXPORT template using mp_void = typename detail::mp_void_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index b6932f2d..0e4a5bc2 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -10,9 +10,11 @@ #include #include +#ifndef BOOST_CXX20_MODULE #include #include #include +#endif #if defined( BOOST_MP11_HAS_CXX14_CONSTEXPR ) # define BOOST_MP11_CONSTEXPR14 constexpr @@ -365,13 +367,13 @@ template<> struct mp_with_index_impl_<16> } // namespace detail -template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +BOOST_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { assert( i < N ); return detail::mp_with_index_impl_::template call<0>( i, std::forward(f) ); } -template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +BOOST_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { return mp_with_index( i, std::forward(f) ); } diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index e20b4520..81968a43 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -16,7 +16,9 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include +#endif namespace boost { @@ -87,7 +89,7 @@ template using mp_all = mp_bool< mp_count_if< mp_list, mp_not #else -template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; +BOOST_MODULE_EXPORT template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; #endif @@ -99,7 +101,7 @@ template struct mp_or_impl; } // namespace detail -template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; +BOOST_MODULE_EXPORT template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; namespace detail { @@ -129,7 +131,7 @@ template using mp_any = mp_bool< mp_count_if< mp_list, mp_to_b #else -template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; +BOOST_MODULE_EXPORT template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; #endif @@ -151,7 +153,7 @@ template struct mp_same_impl } // namespace detail -template using mp_same = typename detail::mp_same_impl::type; +BOOST_MODULE_EXPORT template using mp_same = typename detail::mp_same_impl::type; // mp_similar namespace detail @@ -196,7 +198,7 @@ template struct mp_similar_impl using mp_similar = typename detail::mp_similar_impl::type; +BOOST_MODULE_EXPORT template using mp_similar = typename detail::mp_similar_impl::type; #if BOOST_MP11_GCC # pragma GCC diagnostic push @@ -204,17 +206,17 @@ template using mp_similar = typename detail::mp_similar_impl:: #endif // mp_less -template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; +BOOST_MODULE_EXPORT template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; #if BOOST_MP11_GCC # pragma GCC diagnostic pop #endif // mp_min -template using mp_min = mp_min_element, mp_less>; +BOOST_MODULE_EXPORT template using mp_min = mp_min_element, mp_less>; // mp_max -template using mp_max = mp_max_element, mp_less>; +BOOST_MODULE_EXPORT template using mp_max = mp_max_element, mp_less>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index 013991fa..6d45040b 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -9,7 +9,9 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#ifndef BOOST_CXX20_MODULE #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index 4848ac80..bd9eef9d 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -10,8 +10,11 @@ #include #include +#include +#ifndef BOOST_CXX20_MODULE #include #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -24,22 +27,22 @@ namespace mp11 { // mp_bool -template using mp_bool = std::integral_constant; +BOOST_MODULE_EXPORT template using mp_bool = std::integral_constant; -using mp_true = mp_bool; -using mp_false = mp_bool; +BOOST_MODULE_EXPORT using mp_true = mp_bool; +BOOST_MODULE_EXPORT using mp_false = mp_bool; // mp_to_bool -template using mp_to_bool = mp_bool( T::value )>; +BOOST_MODULE_EXPORT template using mp_to_bool = mp_bool( T::value )>; // mp_not -template using mp_not = mp_bool< !T::value >; +BOOST_MODULE_EXPORT template using mp_not = mp_bool< !T::value >; // mp_int -template using mp_int = std::integral_constant; +BOOST_MODULE_EXPORT template using mp_int = std::integral_constant; // mp_size_t -template using mp_size_t = std::integral_constant; +BOOST_MODULE_EXPORT template using mp_size_t = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index 3d027c2a..7b443ee5 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -17,8 +17,10 @@ #else #include +#ifndef BOOST_CXX20_MODULE #include #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index 46b56053..06dde245 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -17,7 +17,9 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include +#endif #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -33,6 +35,7 @@ namespace mp11 // in detail/mp_list.hpp // mp_list_c +BOOST_MODULE_EXPORT template using mp_list_c = mp_list...>; // mp_list_v @@ -69,9 +72,11 @@ template class L, auto... A> struct mp_size_impl> } // namespace detail +BOOST_MODULE_EXPORT template using mp_size = typename detail::mp_size_impl::type; // mp_empty +BOOST_MODULE_EXPORT template using mp_empty = mp_bool< mp_size::value == 0 >; // mp_assign @@ -109,9 +114,11 @@ template class L1, auto... A, template class L2, auto } // namespace detail +BOOST_MODULE_EXPORT template using mp_assign = typename detail::mp_assign_impl::type; // mp_clear +BOOST_MODULE_EXPORT template using mp_clear = mp_assign>; // mp_front @@ -143,12 +150,15 @@ template class L, auto A1, auto... A> struct mp_pop_front_impl } // namespace detail +BOOST_MODULE_EXPORT template using mp_pop_front = typename detail::mp_pop_front_impl::type; // mp_first +BOOST_MODULE_EXPORT template using mp_first = mp_front; // mp_rest +BOOST_MODULE_EXPORT template using mp_rest = mp_pop_front; // mp_second @@ -177,6 +187,7 @@ template class L, auto A1, auto A2, auto... A> struct mp_secon } // namespace detail +BOOST_MODULE_EXPORT template using mp_second = typename detail::mp_second_impl::type; // mp_third @@ -205,6 +216,7 @@ template class L, auto A1, auto A2, auto A3, auto... A> struct } // namespace detail +BOOST_MODULE_EXPORT template using mp_third = typename detail::mp_third_impl::type; // mp_push_front @@ -232,6 +244,7 @@ template class L, auto... A, class... T> struct mp_push_front_ } // namespace detail +BOOST_MODULE_EXPORT template using mp_push_front = typename detail::mp_push_front_impl::type; // mp_push_back @@ -259,6 +272,7 @@ template class L, auto... A, class... T> struct mp_push_back_i } // namespace detail +BOOST_MODULE_EXPORT template using mp_push_back = typename detail::mp_push_back_impl::type; // mp_rename @@ -289,6 +303,7 @@ template class L, auto... A, template class B> struct } // namespace detail +BOOST_MODULE_EXPORT template class B> using mp_rename_v = typename detail::mp_rename_v_impl::type; #endif @@ -319,9 +334,11 @@ template class L, auto A1, auto... A, class T> struct mp_repla } // namespace detail +BOOST_MODULE_EXPORT template using mp_replace_front = typename detail::mp_replace_front_impl::type; // mp_replace_first +BOOST_MODULE_EXPORT template using mp_replace_first = typename detail::mp_replace_front_impl::type; // mp_replace_second @@ -350,6 +367,7 @@ template class L, auto A1, auto A2, auto... A, class T> struct } // namespace detail +BOOST_MODULE_EXPORT template using mp_replace_second = typename detail::mp_replace_second_impl::type; // mp_replace_third @@ -378,6 +396,7 @@ template class L, auto A1, auto A2, auto A3, auto... A, class } // namespace detail +BOOST_MODULE_EXPORT template using mp_replace_third = typename detail::mp_replace_third_impl::type; // mp_transform_front @@ -406,11 +425,15 @@ template class L, auto A1, auto... A, template class } // namespace detail +BOOST_MODULE_EXPORT template class F> using mp_transform_front = typename detail::mp_transform_front_impl::type; +BOOST_MODULE_EXPORT template using mp_transform_front_q = mp_transform_front; // mp_transform_first +BOOST_MODULE_EXPORT template class F> using mp_transform_first = typename detail::mp_transform_front_impl::type; +BOOST_MODULE_EXPORT template using mp_transform_first_q = mp_transform_first; // mp_transform_second @@ -439,7 +462,9 @@ template class L, auto A1, auto A2, auto... A, template class F> using mp_transform_second = typename detail::mp_transform_second_impl::type; +BOOST_MODULE_EXPORT template using mp_transform_second_q = mp_transform_second; // mp_transform_third @@ -468,7 +493,9 @@ template class L, auto A1, auto A2, auto A3, auto... A, templa } // namespace detail +BOOST_MODULE_EXPORT template class F> using mp_transform_third = typename detail::mp_transform_third_impl::type; +BOOST_MODULE_EXPORT template using mp_transform_third_q = mp_transform_third; } // namespace mp11 diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index b9581ac9..03345f67 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -15,7 +15,9 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include +#endif namespace boost { diff --git a/include/boost/mp11/mpl_tuple.hpp b/include/boost/mp11/mpl_tuple.hpp index b6900b1c..6cfefa24 100644 --- a/include/boost/mp11/mpl_tuple.hpp +++ b/include/boost/mp11/mpl_tuple.hpp @@ -9,7 +9,9 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#ifndef BOOST_CXX20_MODULE #include +#endif namespace boost { diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index d65e4aeb..c72e11b6 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -17,7 +17,9 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include +#endif namespace boost { diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index 044801d5..55b3ffc6 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -12,10 +12,12 @@ #include #include #include +#ifndef BOOST_CXX20_MODULE #include #include #include #include +#endif #if BOOST_MP11_MSVC # pragma warning( push ) diff --git a/include/boost/mp11/utility.hpp b/include/boost/mp11/utility.hpp index 4010aee2..a06eb105 100644 --- a/include/boost/mp11/utility.hpp +++ b/include/boost/mp11/utility.hpp @@ -22,15 +22,18 @@ namespace mp11 { // mp_identity +BOOST_MODULE_EXPORT template struct mp_identity { using type = T; }; // mp_identity_t +BOOST_MODULE_EXPORT template using mp_identity_t = typename mp_identity::type; // mp_inherit +BOOST_MODULE_EXPORT template struct mp_inherit: T... {}; // mp_if, mp_if_c @@ -55,21 +58,21 @@ template class F, class... U> struct mp_eval_if_c_im } // namespace detail -template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; -template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; -template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; +BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; +BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; +BOOST_MODULE_EXPORT template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; // mp_eval_if_not -template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; -template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; +BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; +BOOST_MODULE_EXPORT template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; // mp_eval_or -template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; -template using mp_eval_or_q = mp_eval_or; +BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; +BOOST_MODULE_EXPORT template using mp_eval_or_q = mp_eval_or; // mp_valid_and_true -template class F, class... T> using mp_valid_and_true = mp_eval_or; -template using mp_valid_and_true_q = mp_valid_and_true; +BOOST_MODULE_EXPORT template class F, class... T> using mp_valid_and_true = mp_eval_or; +BOOST_MODULE_EXPORT template using mp_valid_and_true_q = mp_valid_and_true; // mp_cond @@ -83,7 +86,7 @@ template struct mp_cond_impl; } // namespace detail -template using mp_cond = typename detail::mp_cond_impl::type; +BOOST_MODULE_EXPORT template using mp_cond = typename detail::mp_cond_impl::type; namespace detail { @@ -97,6 +100,7 @@ template struct mp_cond_impl: mp_defer class F> struct mp_quote { // the indirection through mp_defer works around the language inability @@ -106,6 +110,7 @@ template class F> struct mp_quote }; // mp_quote_trait +BOOST_MODULE_EXPORT template class F> struct mp_quote_trait { template using fn = typename F::type; @@ -129,16 +134,18 @@ template using mp_invoke_q = typename mp_defer using mp_invoke_q = typename Q::template fn; +BOOST_MODULE_EXPORT template using mp_invoke_q = typename Q::template fn; #endif // mp_not_fn

+BOOST_MODULE_EXPORT template class P> struct mp_not_fn { template using fn = mp_not< mp_invoke_q, T...> >; }; +BOOST_MODULE_EXPORT template using mp_not_fn_q = mp_not_fn; // mp_compose @@ -151,6 +158,7 @@ template using mp_compose_helper = mp_list< mp_apply_q > #if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) +BOOST_MODULE_EXPORT template class... F> struct mp_compose { template using fn = mp_front< mp_fold...>, mp_list, detail::mp_compose_helper> >; @@ -158,6 +166,7 @@ template class... F> struct mp_compose #endif +BOOST_MODULE_EXPORT template struct mp_compose_q { template using fn = mp_front< mp_fold, mp_list, detail::mp_compose_helper> >; diff --git a/modules/mp11.cxx b/modules/mp11.cxx new file mode 100644 index 00000000..128fe941 --- /dev/null +++ b/modules/mp11.cxx @@ -0,0 +1,9 @@ +module; + +#include + +export module boost.mp11; + +import std; + +#include From da9305f54727f66ba75a84208b399432aa78c086 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 12:02:00 +0100 Subject: [PATCH 02/86] check_cmake_version --- test/CMakeLists.txt | 3 +++ test/check_cmake_version.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cab19b65..b5f06e4e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,6 +6,9 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) if(HAVE_BOOST_TEST) +# TODO: I don't know why this is required, it should be handled by target_compile_definitions +add_compile_definitions(BOOST_CXX20_MODULE) + boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::mp11 Boost::core) boost_test(SOURCES check_cmake_version.cpp ARGUMENTS ${PROJECT_VERSION} LINK_LIBRARIES Boost::core Boost::config) diff --git a/test/check_cmake_version.cpp b/test/check_cmake_version.cpp index 2fd46483..3228884b 100644 --- a/test/check_cmake_version.cpp +++ b/test/check_cmake_version.cpp @@ -7,9 +7,15 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include #include +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +#include +#else +#include #include +#endif int main( int ac, char const* av[] ) { From 3808ec9d03e4e6281f421eb6e89f0d6e7f0d9dec Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 12:02:07 +0100 Subject: [PATCH 03/86] mp_size --- test/mp_size.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/mp_size.cpp b/test/mp_size.cpp index a8ea75f7..61ab3d8c 100644 --- a/test/mp_size.cpp +++ b/test/mp_size.cpp @@ -6,13 +6,19 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif int main() { From 904ee5d62e264270de1e22e37b969c20ee7985db Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 12:19:16 +0100 Subject: [PATCH 04/86] detail/modules.hpp --- include/boost/mp11/algorithm.hpp | 1 + include/boost/mp11/bind.hpp | 1 + include/boost/mp11/detail/config.hpp | 6 ------ include/boost/mp11/detail/modules.hpp | 10 ++++++++++ include/boost/mp11/detail/mp_append.hpp | 1 + include/boost/mp11/detail/mp_copy_if.hpp | 1 + include/boost/mp11/detail/mp_count.hpp | 1 + include/boost/mp11/detail/mp_defer.hpp | 1 + include/boost/mp11/detail/mp_fold.hpp | 1 + include/boost/mp11/detail/mp_front.hpp | 1 + include/boost/mp11/detail/mp_is_list.hpp | 1 + include/boost/mp11/detail/mp_is_value_list.hpp | 1 + include/boost/mp11/detail/mp_list.hpp | 1 + include/boost/mp11/detail/mp_list_v.hpp | 1 + include/boost/mp11/detail/mp_map_find.hpp | 1 + include/boost/mp11/detail/mp_min_element.hpp | 1 + include/boost/mp11/detail/mp_plus.hpp | 1 + include/boost/mp11/detail/mp_remove_if.hpp | 1 + include/boost/mp11/detail/mp_rename.hpp | 1 + include/boost/mp11/detail/mp_value.hpp | 3 ++- include/boost/mp11/detail/mp_void.hpp | 1 + include/boost/mp11/detail/mp_with_index.hpp | 1 + include/boost/mp11/function.hpp | 1 + include/boost/mp11/integer_sequence.hpp | 1 + include/boost/mp11/integral.hpp | 1 + include/boost/mp11/lambda.hpp | 1 + include/boost/mp11/list.hpp | 1 + include/boost/mp11/map.hpp | 1 + include/boost/mp11/set.hpp | 1 + include/boost/mp11/tuple.hpp | 1 + include/boost/mp11/utility.hpp | 1 + 31 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 include/boost/mp11/detail/modules.hpp diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 0a005788..8de36859 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifndef BOOST_CXX20_MODULE #include #include diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 2edd5b13..3e4444ef 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -10,6 +10,7 @@ #include #include +#include #ifndef BOOST_CXX20_MODULE #include #endif diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index fe70c42a..44686c73 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -146,10 +146,4 @@ # define BOOST_MP11_DEPRECATED(msg) #endif -#ifdef BOOST_CXX20_MODULE -#define BOOST_MODULE_EXPORT export -#else -#define BOOST_MODULE_EXPORT -#endif - #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED diff --git a/include/boost/mp11/detail/modules.hpp b/include/boost/mp11/detail/modules.hpp new file mode 100644 index 00000000..c92a405a --- /dev/null +++ b/include/boost/mp11/detail/modules.hpp @@ -0,0 +1,10 @@ +#ifndef BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED +#define BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED + +#ifdef BOOST_CXX20_MODULE +#define BOOST_MODULE_EXPORT export +#else +#define BOOST_MODULE_EXPORT +#endif + +#endif \ No newline at end of file diff --git a/include/boost/mp11/detail/mp_append.hpp b/include/boost/mp11/detail/mp_append.hpp index 8c8b636c..0815eed3 100644 --- a/include/boost/mp11/detail/mp_append.hpp +++ b/include/boost/mp11/detail/mp_append.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_copy_if.hpp b/include/boost/mp11/detail/mp_copy_if.hpp index e2e249ac..627864a0 100644 --- a/include/boost/mp11/detail/mp_copy_if.hpp +++ b/include/boost/mp11/detail/mp_copy_if.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index a999078c..45db8a4e 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_defer.hpp b/include/boost/mp11/detail/mp_defer.hpp index 6d5b0abf..746edfc1 100644 --- a/include/boost/mp11/detail/mp_defer.hpp +++ b/include/boost/mp11/detail/mp_defer.hpp @@ -7,6 +7,7 @@ #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_fold.hpp b/include/boost/mp11/detail/mp_fold.hpp index a8bba0dc..c9536b69 100644 --- a/include/boost/mp11/detail/mp_fold.hpp +++ b/include/boost/mp11/detail/mp_fold.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_front.hpp b/include/boost/mp11/detail/mp_front.hpp index 4a56bbc5..abc01bcd 100644 --- a/include/boost/mp11/detail/mp_front.hpp +++ b/include/boost/mp11/detail/mp_front.hpp @@ -10,6 +10,7 @@ #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_is_list.hpp b/include/boost/mp11/detail/mp_is_list.hpp index 5eed313b..82e7a270 100644 --- a/include/boost/mp11/detail/mp_is_list.hpp +++ b/include/boost/mp11/detail/mp_is_list.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_is_value_list.hpp b/include/boost/mp11/detail/mp_is_value_list.hpp index 81c08023..537fe8cc 100644 --- a/include/boost/mp11/detail/mp_is_value_list.hpp +++ b/include/boost/mp11/detail/mp_is_value_list.hpp @@ -7,6 +7,7 @@ #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_list.hpp b/include/boost/mp11/detail/mp_list.hpp index 87bc3af4..1b1582d6 100644 --- a/include/boost/mp11/detail/mp_list.hpp +++ b/include/boost/mp11/detail/mp_list.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_list_v.hpp b/include/boost/mp11/detail/mp_list_v.hpp index cf6fb1c9..33946616 100644 --- a/include/boost/mp11/detail/mp_list_v.hpp +++ b/include/boost/mp11/detail/mp_list_v.hpp @@ -6,6 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_map_find.hpp b/include/boost/mp11/detail/mp_map_find.hpp index 7e8fff47..fca6e89e 100644 --- a/include/boost/mp11/detail/mp_map_find.hpp +++ b/include/boost/mp11/detail/mp_map_find.hpp @@ -10,6 +10,7 @@ #include #include +#include #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1930 ) diff --git a/include/boost/mp11/detail/mp_min_element.hpp b/include/boost/mp11/detail/mp_min_element.hpp index 24a935e7..0da2d381 100644 --- a/include/boost/mp11/detail/mp_min_element.hpp +++ b/include/boost/mp11/detail/mp_min_element.hpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index 46721d4c..ac390024 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #ifndef BOOST_CXX20_MODULE #include #endif diff --git a/include/boost/mp11/detail/mp_remove_if.hpp b/include/boost/mp11/detail/mp_remove_if.hpp index 4a17be8b..0c5a6cce 100644 --- a/include/boost/mp11/detail/mp_remove_if.hpp +++ b/include/boost/mp11/detail/mp_remove_if.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_rename.hpp b/include/boost/mp11/detail/mp_rename.hpp index 5bdd6f9d..9e9e2c10 100644 --- a/include/boost/mp11/detail/mp_rename.hpp +++ b/include/boost/mp11/detail/mp_rename.hpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index 88db9b7b..e5a09012 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -6,6 +6,7 @@ // https://www.boost.org/LICENSE_1_0.txt #include +#include #ifndef BOOST_CXX20_MODULE #include #endif @@ -17,7 +18,7 @@ namespace boost namespace mp11 { -template using mp_value = std::integral_constant; +BOOST_MODULE_EXPORT template using mp_value = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_void.hpp b/include/boost/mp11/detail/mp_void.hpp index ad679dd0..36bcada0 100644 --- a/include/boost/mp11/detail/mp_void.hpp +++ b/include/boost/mp11/detail/mp_void.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index 0e4a5bc2..012a2adc 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -10,6 +10,7 @@ #include #include +#include #ifndef BOOST_CXX20_MODULE #include #include diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 81968a43..86af63c8 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #ifndef BOOST_CXX20_MODULE #include #endif diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index 6d45040b..8c313363 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #ifndef BOOST_CXX20_MODULE #include #endif diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index bd9eef9d..d0fb1440 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #ifndef BOOST_CXX20_MODULE #include #include diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index 7b443ee5..4d5b7dc7 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #if BOOST_MP11_WORKAROUND(BOOST_MP11_MSVC, <= 1800) diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index 06dde245..49b26946 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifndef BOOST_CXX20_MODULE #include #endif diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index 03345f67..ab0a0b66 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #include #include #include diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index c72e11b6..12b4338f 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -8,6 +8,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include #include #include #include diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index 55b3ffc6..c0ff1e63 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -8,6 +8,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include #include #include #include diff --git a/include/boost/mp11/utility.hpp b/include/boost/mp11/utility.hpp index a06eb105..bf8e5c41 100644 --- a/include/boost/mp11/utility.hpp +++ b/include/boost/mp11/utility.hpp @@ -8,6 +8,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include #include #include #include From 7249a36abe39a772246d98539d129771f1912871 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 12:21:00 +0100 Subject: [PATCH 05/86] mp_size_2 --- test/mp_size_2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/mp_size_2.cpp b/test/mp_size_2.cpp index c272eecc..5b64c381 100644 --- a/test/mp_size_2.cpp +++ b/test/mp_size_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,15 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include +#endif template struct L1 {}; template struct L2 {}; From 7da053123659762177c0d5eec8d05080f20eb05e Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 13:04:40 +0100 Subject: [PATCH 06/86] Use CMake helper function --- CMakeLists.txt | 7 ++----- test/CMakeLists.txt | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be082d3d..f7708102 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,13 +7,10 @@ cmake_minimum_required(VERSION 3.5...3.31) project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) if (BOOST_CXX20_MODULE) - add_library(boost_mp11) + add_library(boost_mp11 STATIC) + boost_set_cxx20_module_settings(boost_mp11) target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES FILES modules/mp11.cxx) target_include_directories(boost_mp11 PUBLIC include) - target_compile_features(boost_mp11 PUBLIC cxx_std_23) - set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) - target_compile_definitions(boost_mp11 PUBLIC BOOST_CXX20_MODULE) - target_compile_options(boost_mp11 PUBLIC -Wno-include-angled-in-module-purview) # TODO: scope this to clang else() add_library(boost_mp11 INTERFACE) target_include_directories(boost_mp11 INTERFACE include) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b5f06e4e..cab19b65 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,9 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) if(HAVE_BOOST_TEST) -# TODO: I don't know why this is required, it should be handled by target_compile_definitions -add_compile_definitions(BOOST_CXX20_MODULE) - boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::mp11 Boost::core) boost_test(SOURCES check_cmake_version.cpp ARGUMENTS ${PROJECT_VERSION} LINK_LIBRARIES Boost::core Boost::config) From 224e8e784f39a1a367febe05e99022b698eed546 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 13:04:51 +0100 Subject: [PATCH 07/86] Temporarily comment tests --- test/Jamfile | 488 +++++++++++++++++++++++++-------------------------- 1 file changed, 244 insertions(+), 244 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index e7f018de..a0905c70 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -27,265 +27,265 @@ project clang:on ; -# include-only -compile mp11.cpp ; -compile complex_h.cpp ; +# # include-only +# compile mp11.cpp ; +# compile complex_h.cpp ; -# list +# # list run mp_size.cpp ; run mp_size_2.cpp ; -run mp_empty.cpp ; -run mp_empty_2.cpp ; -run mp_assign.cpp ; -run mp_assign_2.cpp ; -run mp_clear.cpp ; -run mp_clear_2.cpp ; -run mp_front.cpp ; -run mp_front_2.cpp ; -run mp_pop_front.cpp ; -run mp_pop_front_2.cpp ; -run mp_second.cpp ; -run mp_second_2.cpp ; -run mp_third.cpp ; -run mp_third_2.cpp ; -run mp_push_front.cpp ; -run mp_push_front_2.cpp ; -run mp_push_back.cpp ; -run mp_push_back_2.cpp ; -run mp_rename.cpp ; -run mp_rename_2.cpp ; -run mp_append.cpp ; -run mp_append_2.cpp ; -run mp_append_3.cpp ; -run mp_append_sf.cpp ; -run mp_replace_front.cpp ; -run mp_replace_front_2.cpp ; -run mp_replace_second.cpp ; -run mp_replace_second_2.cpp ; -run mp_replace_third.cpp ; -run mp_replace_third_2.cpp ; -run mp_apply_q.cpp ; -run mp_apply_q_sf.cpp ; -run mp_is_list.cpp ; -run mp_list_c.cpp ; -run mp_transform_front.cpp ; -run mp_transform_front_2.cpp ; -run mp_transform_second.cpp ; -run mp_transform_second_2.cpp ; -run mp_transform_third.cpp ; -run mp_transform_third_2.cpp ; -run mp_list_v.cpp ; -run mp_rename_v.cpp ; -run mp_is_value_list.cpp ; +# run mp_empty.cpp ; +# run mp_empty_2.cpp ; +# run mp_assign.cpp ; +# run mp_assign_2.cpp ; +# run mp_clear.cpp ; +# run mp_clear_2.cpp ; +# run mp_front.cpp ; +# run mp_front_2.cpp ; +# run mp_pop_front.cpp ; +# run mp_pop_front_2.cpp ; +# run mp_second.cpp ; +# run mp_second_2.cpp ; +# run mp_third.cpp ; +# run mp_third_2.cpp ; +# run mp_push_front.cpp ; +# run mp_push_front_2.cpp ; +# run mp_push_back.cpp ; +# run mp_push_back_2.cpp ; +# run mp_rename.cpp ; +# run mp_rename_2.cpp ; +# run mp_append.cpp ; +# run mp_append_2.cpp ; +# run mp_append_3.cpp ; +# run mp_append_sf.cpp ; +# run mp_replace_front.cpp ; +# run mp_replace_front_2.cpp ; +# run mp_replace_second.cpp ; +# run mp_replace_second_2.cpp ; +# run mp_replace_third.cpp ; +# run mp_replace_third_2.cpp ; +# run mp_apply_q.cpp ; +# run mp_apply_q_sf.cpp ; +# run mp_is_list.cpp ; +# run mp_list_c.cpp ; +# run mp_transform_front.cpp ; +# run mp_transform_front_2.cpp ; +# run mp_transform_second.cpp ; +# run mp_transform_second_2.cpp ; +# run mp_transform_third.cpp ; +# run mp_transform_third_2.cpp ; +# run mp_list_v.cpp ; +# run mp_rename_v.cpp ; +# run mp_is_value_list.cpp ; -# algorithm -run mp_transform.cpp ; -run mp_transform_2.cpp ; -run mp_transform_q.cpp ; -run mp_transform_q_2.cpp ; -run mp_transform_sf.cpp ; -run mp_transform_if.cpp ; -run mp_transform_if_q.cpp ; -run mp_filter.cpp ; -run mp_fill.cpp ; -run mp_fill_2.cpp ; -run mp_count.cpp ; -run mp_count_if.cpp ; -run mp_count_if_q.cpp ; -run mp_contains.cpp ; -run mp_starts_with.cpp ; -run mp_starts_with_sf.cpp ; -run mp_repeat.cpp ; -run mp_repeat_2.cpp ; -run mp_repeat_3.cpp ; -run mp_product.cpp ; -run mp_drop.cpp ; -run mp_drop_2.cpp ; -run mp_iota.cpp ; -run mp_iota_2.cpp ; -run mp_at.cpp ; -run mp_at_2.cpp ; -run mp_at_sf.cpp : : : gcc-4.7:all ; -run mp_take.cpp ; -run mp_take_2.cpp ; -run mp_slice.cpp ; -run mp_slice_2.cpp ; -run mp_replace.cpp ; -run mp_replace_if.cpp ; -run mp_replace_if_q.cpp ; -run mp_copy_if.cpp ; -run mp_copy_if_q.cpp ; -run mp_remove.cpp ; -run mp_remove_if.cpp ; -run mp_remove_if_q.cpp ; -run mp_partition.cpp ; -run mp_partition_q.cpp ; -run mp_sort.cpp ; -run mp_sort_q.cpp ; -run mp_find.cpp ; -run mp_find_if.cpp ; -run mp_find_if_q.cpp ; -run mp_reverse.cpp ; -run mp_fold.cpp ; -run mp_fold_q.cpp ; -run mp_fold_q_sf.cpp ; -run mp_reverse_fold.cpp ; -run mp_reverse_fold_q.cpp ; -run mp_unique.cpp ; -run mp_unique_if.cpp ; -run mp_unique_if_q.cpp ; -run mp_all_of.cpp ; -run mp_all_of_q.cpp ; -run mp_any_of.cpp ; -run mp_any_of_q.cpp ; -run mp_none_of.cpp ; -run mp_none_of_q.cpp ; -run mp_replace_at.cpp ; -run mp_replace_at_c.cpp ; -run mp_for_each.cpp ; -run mp_insert.cpp ; -run mp_insert_2.cpp ; -run mp_erase.cpp ; -run mp_erase_2.cpp ; -run mp_with_index.cpp ; -run mp_with_index_cx.cpp ; -run mp_from_sequence.cpp ; -run mp_from_sequence_2.cpp ; -run mp_min_element.cpp ; -run mp_min_element_2.cpp ; -run mp_min_element_q.cpp ; -run mp_min_element_q_2.cpp ; -run mp_max_element.cpp ; -run mp_max_element_2.cpp ; -run mp_max_element_q.cpp ; -run mp_max_element_q_2.cpp ; -run mp_nth_element.cpp ; -run mp_nth_element_q.cpp ; -run mp_back.cpp ; -run mp_back_2.cpp ; -run mp_pop_back.cpp ; -run mp_pop_back_2.cpp ; -run mp_flatten.cpp ; -run mp_rotate_left.cpp ; -run mp_rotate_right.cpp ; -run mp_power_set.cpp ; -run mp_partial_sum.cpp ; -run mp_iterate.cpp ; -run mp_pairwise_fold.cpp ; -run mp_pairwise_fold_q.cpp ; -run mp_sliding_fold.cpp ; -run mp_sliding_fold_q.cpp ; -run mp_intersperse.cpp ; -run mp_split.cpp ; -run mp_join.cpp ; +# # algorithm +# run mp_transform.cpp ; +# run mp_transform_2.cpp ; +# run mp_transform_q.cpp ; +# run mp_transform_q_2.cpp ; +# run mp_transform_sf.cpp ; +# run mp_transform_if.cpp ; +# run mp_transform_if_q.cpp ; +# run mp_filter.cpp ; +# run mp_fill.cpp ; +# run mp_fill_2.cpp ; +# run mp_count.cpp ; +# run mp_count_if.cpp ; +# run mp_count_if_q.cpp ; +# run mp_contains.cpp ; +# run mp_starts_with.cpp ; +# run mp_starts_with_sf.cpp ; +# run mp_repeat.cpp ; +# run mp_repeat_2.cpp ; +# run mp_repeat_3.cpp ; +# run mp_product.cpp ; +# run mp_drop.cpp ; +# run mp_drop_2.cpp ; +# run mp_iota.cpp ; +# run mp_iota_2.cpp ; +# run mp_at.cpp ; +# run mp_at_2.cpp ; +# run mp_at_sf.cpp : : : gcc-4.7:all ; +# run mp_take.cpp ; +# run mp_take_2.cpp ; +# run mp_slice.cpp ; +# run mp_slice_2.cpp ; +# run mp_replace.cpp ; +# run mp_replace_if.cpp ; +# run mp_replace_if_q.cpp ; +# run mp_copy_if.cpp ; +# run mp_copy_if_q.cpp ; +# run mp_remove.cpp ; +# run mp_remove_if.cpp ; +# run mp_remove_if_q.cpp ; +# run mp_partition.cpp ; +# run mp_partition_q.cpp ; +# run mp_sort.cpp ; +# run mp_sort_q.cpp ; +# run mp_find.cpp ; +# run mp_find_if.cpp ; +# run mp_find_if_q.cpp ; +# run mp_reverse.cpp ; +# run mp_fold.cpp ; +# run mp_fold_q.cpp ; +# run mp_fold_q_sf.cpp ; +# run mp_reverse_fold.cpp ; +# run mp_reverse_fold_q.cpp ; +# run mp_unique.cpp ; +# run mp_unique_if.cpp ; +# run mp_unique_if_q.cpp ; +# run mp_all_of.cpp ; +# run mp_all_of_q.cpp ; +# run mp_any_of.cpp ; +# run mp_any_of_q.cpp ; +# run mp_none_of.cpp ; +# run mp_none_of_q.cpp ; +# run mp_replace_at.cpp ; +# run mp_replace_at_c.cpp ; +# run mp_for_each.cpp ; +# run mp_insert.cpp ; +# run mp_insert_2.cpp ; +# run mp_erase.cpp ; +# run mp_erase_2.cpp ; +# run mp_with_index.cpp ; +# run mp_with_index_cx.cpp ; +# run mp_from_sequence.cpp ; +# run mp_from_sequence_2.cpp ; +# run mp_min_element.cpp ; +# run mp_min_element_2.cpp ; +# run mp_min_element_q.cpp ; +# run mp_min_element_q_2.cpp ; +# run mp_max_element.cpp ; +# run mp_max_element_2.cpp ; +# run mp_max_element_q.cpp ; +# run mp_max_element_q_2.cpp ; +# run mp_nth_element.cpp ; +# run mp_nth_element_q.cpp ; +# run mp_back.cpp ; +# run mp_back_2.cpp ; +# run mp_pop_back.cpp ; +# run mp_pop_back_2.cpp ; +# run mp_flatten.cpp ; +# run mp_rotate_left.cpp ; +# run mp_rotate_right.cpp ; +# run mp_power_set.cpp ; +# run mp_partial_sum.cpp ; +# run mp_iterate.cpp ; +# run mp_pairwise_fold.cpp ; +# run mp_pairwise_fold_q.cpp ; +# run mp_sliding_fold.cpp ; +# run mp_sliding_fold_q.cpp ; +# run mp_intersperse.cpp ; +# run mp_split.cpp ; +# run mp_join.cpp ; -# integral -run integral.cpp ; -run mp_value.cpp ; +# # integral +# run integral.cpp ; +# run mp_value.cpp ; -# utility -run mp_identity.cpp ; -run mp_inherit.cpp ; -run mp_if.cpp ; -run mp_if_sf.cpp ; -run mp_eval_if.cpp ; -run mp_eval_if_sf.cpp ; -run mp_valid.cpp ; -run mp_defer.cpp ; -run mp_quote.cpp ; -run mp_invoke_q.cpp ; -run mp_invoke_q_sf.cpp ; -run mp_quote_trait.cpp ; -run mp_cond.cpp ; -run mp_cond_sf.cpp ; -run mp_not_fn.cpp ; -run mp_eval_if_not.cpp ; -run mp_eval_or.cpp ; -run mp_compose.cpp ; -run mp_valid_and_true.cpp ; -compile mp_compose_sf.cpp ; +# # utility +# run mp_identity.cpp ; +# run mp_inherit.cpp ; +# run mp_if.cpp ; +# run mp_if_sf.cpp ; +# run mp_eval_if.cpp ; +# run mp_eval_if_sf.cpp ; +# run mp_valid.cpp ; +# run mp_defer.cpp ; +# run mp_quote.cpp ; +# run mp_invoke_q.cpp ; +# run mp_invoke_q_sf.cpp ; +# run mp_quote_trait.cpp ; +# run mp_cond.cpp ; +# run mp_cond_sf.cpp ; +# run mp_not_fn.cpp ; +# run mp_eval_if_not.cpp ; +# run mp_eval_or.cpp ; +# run mp_compose.cpp ; +# run mp_valid_and_true.cpp ; +# compile mp_compose_sf.cpp ; -# integer_sequence -run integer_sequence.cpp ; +# # integer_sequence +# run integer_sequence.cpp ; -# tuple -run tuple_for_each.cpp ; -compile tuple_for_each_cx.cpp ; -run tuple_apply.cpp ; -compile tuple_apply_cx.cpp ; -run construct_from_tuple.cpp ; -compile construct_from_tuple_cx.cpp ; -run tuple_transform.cpp ; -run tuple_transform_2.cpp ; -compile tuple_transform_cx.cpp ; +# # tuple +# run tuple_for_each.cpp ; +# compile tuple_for_each_cx.cpp ; +# run tuple_apply.cpp ; +# compile tuple_apply_cx.cpp ; +# run construct_from_tuple.cpp ; +# compile construct_from_tuple_cx.cpp ; +# run tuple_transform.cpp ; +# run tuple_transform_2.cpp ; +# compile tuple_transform_cx.cpp ; -# set -run mp_set_contains.cpp ; -run mp_set_push_back.cpp ; -run mp_set_push_front.cpp ; -run mp_is_set.cpp ; -run mp_set_union.cpp ; -run mp_set_union_sf.cpp ; -run mp_set_difference.cpp ; -run mp_set_difference_sf.cpp ; -run mp_set_intersection.cpp ; -run mp_set_intersection_sf.cpp ; +# # set +# run mp_set_contains.cpp ; +# run mp_set_push_back.cpp ; +# run mp_set_push_front.cpp ; +# run mp_is_set.cpp ; +# run mp_set_union.cpp ; +# run mp_set_union_sf.cpp ; +# run mp_set_difference.cpp ; +# run mp_set_difference_sf.cpp ; +# run mp_set_intersection.cpp ; +# run mp_set_intersection_sf.cpp ; -# function -run mp_all.cpp ; -run mp_all_2.cpp ; -run mp_and.cpp ; -run mp_any.cpp ; -run mp_any_2.cpp ; -run mp_or.cpp ; -run mp_same.cpp ; -run mp_plus.cpp ; -run mp_less.cpp ; -run mp_min.cpp ; -run mp_max.cpp ; -run mp_similar.cpp ; +# # function +# run mp_all.cpp ; +# run mp_all_2.cpp ; +# run mp_and.cpp ; +# run mp_any.cpp ; +# run mp_any_2.cpp ; +# run mp_or.cpp ; +# run mp_same.cpp ; +# run mp_plus.cpp ; +# run mp_less.cpp ; +# run mp_min.cpp ; +# run mp_max.cpp ; +# run mp_similar.cpp ; -# map -run mp_map_find.cpp ; -run mp_map_find_2.cpp ; -run mp_map_find_3.cpp ; -run mp_map_contains.cpp ; -run mp_map_insert.cpp ; -run mp_map_replace.cpp ; -run mp_map_erase.cpp ; -run mp_map_update.cpp ; -run mp_map_update_q.cpp ; -run mp_map_keys.cpp ; -run mp_is_map.cpp ; +# # map +# run mp_map_find.cpp ; +# run mp_map_find_2.cpp ; +# run mp_map_find_3.cpp ; +# run mp_map_contains.cpp ; +# run mp_map_insert.cpp ; +# run mp_map_replace.cpp ; +# run mp_map_erase.cpp ; +# run mp_map_update.cpp ; +# run mp_map_update_q.cpp ; +# run mp_map_keys.cpp ; +# run mp_is_map.cpp ; -# bind -run mp_bind.cpp ; -run mp_bind_q.cpp ; -run mp_bind_front.cpp ; -run mp_bind_back.cpp ; +# # bind +# run mp_bind.cpp ; +# run mp_bind_q.cpp ; +# run mp_bind_front.cpp ; +# run mp_bind_back.cpp ; -# lambda -run mp_lambda.cpp ; +# # lambda +# run mp_lambda.cpp ; -# mpl -run mpl.cpp : ; -run mpl_list.cpp : ; -run mpl_tuple.cpp : ; +# # mpl +# run mpl.cpp : ; +# run mpl_list.cpp : ; +# run mpl_tuple.cpp : ; -# version -run version.cpp ; -run mp11_version.cpp ; -run list_version.cpp ; -run algorithm_version.cpp ; -run integral_version.cpp ; -run utility_version.cpp ; -run function_version.cpp ; -run map_version.cpp ; -run set_version.cpp ; -run bind_version.cpp ; -run integer_sequence_version.cpp ; -run tuple_version.cpp ; -run mpl_version.cpp ; +# # version +# run version.cpp ; +# run mp11_version.cpp ; +# run list_version.cpp ; +# run algorithm_version.cpp ; +# run integral_version.cpp ; +# run utility_version.cpp ; +# run function_version.cpp ; +# run map_version.cpp ; +# run set_version.cpp ; +# run bind_version.cpp ; +# run integer_sequence_version.cpp ; +# run tuple_version.cpp ; +# run mpl_version.cpp ; # quick (for CI) alias quick : mp11 mp_size ; From c86e5a012681809996af5c4f60adb5e4bcd3a11c Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 22 Dec 2024 18:16:04 +0100 Subject: [PATCH 08/86] Recovered 10 more tests --- test/Jamfile | 20 ++++++++++---------- test/mp_assign.cpp | 8 +++++++- test/mp_assign_2.cpp | 10 +++++++++- test/mp_clear.cpp | 8 +++++++- test/mp_clear_2.cpp | 10 +++++++++- test/mp_empty.cpp | 7 +++++++ test/mp_empty_2.cpp | 10 +++++++++- test/mp_front.cpp | 8 +++++++- test/mp_front_2.cpp | 10 +++++++++- test/mp_pop_front.cpp | 8 +++++++- test/mp_pop_front_2.cpp | 10 +++++++++- 11 files changed, 90 insertions(+), 19 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index a0905c70..76307fea 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -34,16 +34,16 @@ project # # list run mp_size.cpp ; run mp_size_2.cpp ; -# run mp_empty.cpp ; -# run mp_empty_2.cpp ; -# run mp_assign.cpp ; -# run mp_assign_2.cpp ; -# run mp_clear.cpp ; -# run mp_clear_2.cpp ; -# run mp_front.cpp ; -# run mp_front_2.cpp ; -# run mp_pop_front.cpp ; -# run mp_pop_front_2.cpp ; +run mp_empty.cpp ; +run mp_empty_2.cpp ; +run mp_assign.cpp ; +run mp_assign_2.cpp ; +run mp_clear.cpp ; +run mp_clear_2.cpp ; +run mp_front.cpp ; +run mp_front_2.cpp ; +run mp_pop_front.cpp ; +run mp_pop_front_2.cpp ; # run mp_second.cpp ; # run mp_second_2.cpp ; # run mp_third.cpp ; diff --git a/test/mp_assign.cpp b/test/mp_assign.cpp index 60edd0cb..5f6ba387 100644 --- a/test/mp_assign.cpp +++ b/test/mp_assign.cpp @@ -6,12 +6,18 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif struct X1 {}; struct X2 {}; diff --git a/test/mp_assign_2.cpp b/test/mp_assign_2.cpp index be358987..b9b2c9ca 100644 --- a/test/mp_assign_2.cpp +++ b/test/mp_assign_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,9 +11,17 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif template struct L1 {}; template struct L2 {}; diff --git a/test/mp_clear.cpp b/test/mp_clear.cpp index 9684c714..a5652ca6 100644 --- a/test/mp_clear.cpp +++ b/test/mp_clear.cpp @@ -6,11 +6,17 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif int main() { diff --git a/test/mp_clear_2.cpp b/test/mp_clear_2.cpp index 2c5853d4..e0e1c5b6 100644 --- a/test/mp_clear_2.cpp +++ b/test/mp_clear_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,16 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif template struct L1 {}; template struct L2 {}; diff --git a/test/mp_empty.cpp b/test/mp_empty.cpp index 87e0fb7c..9d9b2735 100644 --- a/test/mp_empty.cpp +++ b/test/mp_empty.cpp @@ -7,12 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif int main() { diff --git a/test/mp_empty_2.cpp b/test/mp_empty_2.cpp index 0d6b9593..d279ff2d 100644 --- a/test/mp_empty_2.cpp +++ b/test/mp_empty_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,16 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif template struct L1 {}; template struct L2 {}; diff --git a/test/mp_front.cpp b/test/mp_front.cpp index 3edb856c..686580df 100644 --- a/test/mp_front.cpp +++ b/test/mp_front.cpp @@ -6,12 +6,18 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif int main() { diff --git a/test/mp_front_2.cpp b/test/mp_front_2.cpp index 17b17e54..18bf0821 100644 --- a/test/mp_front_2.cpp +++ b/test/mp_front_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,16 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif template struct L1 {}; template struct L2 {}; diff --git a/test/mp_pop_front.cpp b/test/mp_pop_front.cpp index f1ff16a5..c6cfc8ad 100644 --- a/test/mp_pop_front.cpp +++ b/test/mp_pop_front.cpp @@ -6,12 +6,18 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif int main() { diff --git a/test/mp_pop_front_2.cpp b/test/mp_pop_front_2.cpp index cfd79ead..a81fc065 100644 --- a/test/mp_pop_front_2.cpp +++ b/test/mp_pop_front_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,7 +11,15 @@ int main() {} #else +#ifdef BOOST_CXX20_MODULE +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include +#endif template struct L1 {}; template struct L2 {}; From ebdb3c45dff4e4bfe272bed2c24ab6a671452d19 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 30 Dec 2024 10:47:16 +0100 Subject: [PATCH 09/86] Rename module to boost_xxx.cpppm --- CMakeLists.txt | 2 +- modules/{mp11.cxx => boost_mp11.cppm} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename modules/{mp11.cxx => boost_mp11.cppm} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7708102..beae8481 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) if (BOOST_CXX20_MODULE) add_library(boost_mp11 STATIC) boost_set_cxx20_module_settings(boost_mp11) - target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES FILES modules/mp11.cxx) + target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES FILES modules/boost_mp11.cppm) target_include_directories(boost_mp11 PUBLIC include) else() add_library(boost_mp11 INTERFACE) diff --git a/modules/mp11.cxx b/modules/boost_mp11.cppm similarity index 100% rename from modules/mp11.cxx rename to modules/boost_mp11.cppm From 97e83bc6bad310cd00d1042a6b54857082f2c286 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 30 Dec 2024 10:56:15 +0100 Subject: [PATCH 10/86] BASE_DIRS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index beae8481..628227a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) if (BOOST_CXX20_MODULE) add_library(boost_mp11 STATIC) boost_set_cxx20_module_settings(boost_mp11) - target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES FILES modules/boost_mp11.cppm) + target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES BASE_DIRS modules FILES modules/boost_mp11.cppm) target_include_directories(boost_mp11 PUBLIC include) else() add_library(boost_mp11 INTERFACE) From 2d0cd75c26553069aed00acce551165815c454d4 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 30 Dec 2024 10:58:43 +0100 Subject: [PATCH 11/86] extern C++ --- modules/boost_mp11.cppm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/boost_mp11.cppm b/modules/boost_mp11.cppm index 128fe941..b6fa99ea 100644 --- a/modules/boost_mp11.cppm +++ b/modules/boost_mp11.cppm @@ -6,4 +6,6 @@ export module boost.mp11; import std; +extern "C++" { #include +} From 3bf2419b73e818ba750b3b045404699ff45e292b Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 30 Dec 2024 11:19:35 +0100 Subject: [PATCH 12/86] Rename config macro to BOOST_USE_MODULES --- CMakeLists.txt | 2 +- include/boost/mp11/algorithm.hpp | 2 +- include/boost/mp11/bind.hpp | 2 +- include/boost/mp11/detail/modules.hpp | 2 +- include/boost/mp11/detail/mp_plus.hpp | 2 +- include/boost/mp11/detail/mp_value.hpp | 2 +- include/boost/mp11/detail/mp_with_index.hpp | 2 +- include/boost/mp11/function.hpp | 2 +- include/boost/mp11/integer_sequence.hpp | 2 +- include/boost/mp11/integral.hpp | 2 +- include/boost/mp11/lambda.hpp | 2 +- include/boost/mp11/list.hpp | 2 +- include/boost/mp11/map.hpp | 2 +- include/boost/mp11/mpl_tuple.hpp | 2 +- include/boost/mp11/set.hpp | 2 +- include/boost/mp11/tuple.hpp | 2 +- test/check_cmake_version.cpp | 2 +- test/mp_assign.cpp | 2 +- test/mp_assign_2.cpp | 2 +- test/mp_clear.cpp | 2 +- test/mp_clear_2.cpp | 2 +- test/mp_empty.cpp | 2 +- test/mp_empty_2.cpp | 2 +- test/mp_front.cpp | 2 +- test/mp_front_2.cpp | 2 +- test/mp_pop_front.cpp | 2 +- test/mp_pop_front_2.cpp | 2 +- test/mp_size.cpp | 2 +- test/mp_size_2.cpp | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 628227a8..9b608c71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5...3.31) project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) -if (BOOST_CXX20_MODULE) +if (BOOST_USE_MODULES) add_library(boost_mp11 STATIC) boost_set_cxx20_module_settings(boost_mp11) target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES BASE_DIRS modules FILES modules/boost_mp11.cppm) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 8de36859..fd9bd9b9 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -24,7 +24,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #include #endif diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 3e4444ef..40ca943a 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -11,7 +11,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/detail/modules.hpp b/include/boost/mp11/detail/modules.hpp index c92a405a..0e0bdb94 100644 --- a/include/boost/mp11/detail/modules.hpp +++ b/include/boost/mp11/detail/modules.hpp @@ -1,7 +1,7 @@ #ifndef BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED #define BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES #define BOOST_MODULE_EXPORT export #else #define BOOST_MODULE_EXPORT diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index ac390024..70eb26ef 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -10,7 +10,7 @@ #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index e5a09012..df304add 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -7,7 +7,7 @@ #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index 012a2adc..8c269259 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -11,7 +11,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #include #include diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 86af63c8..282418a7 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -17,7 +17,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index 8c313363..b9052fec 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -10,7 +10,7 @@ #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index d0fb1440..7983d5e7 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -12,7 +12,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #include #endif diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index 4d5b7dc7..7ce61671 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -18,7 +18,7 @@ #else #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #include #endif diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index 49b26946..ad4dcf32 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -18,7 +18,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index ab0a0b66..a3fe3a4d 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -16,7 +16,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/mpl_tuple.hpp b/include/boost/mp11/mpl_tuple.hpp index 6cfefa24..2de04e1b 100644 --- a/include/boost/mp11/mpl_tuple.hpp +++ b/include/boost/mp11/mpl_tuple.hpp @@ -9,7 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index 12b4338f..1f4b84fc 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -18,7 +18,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index c0ff1e63..c37883f6 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -13,7 +13,7 @@ #include #include #include -#ifndef BOOST_CXX20_MODULE +#ifndef BOOST_USE_MODULES #include #include #include diff --git a/test/check_cmake_version.cpp b/test/check_cmake_version.cpp index 3228884b..db614ef4 100644 --- a/test/check_cmake_version.cpp +++ b/test/check_cmake_version.cpp @@ -8,7 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; #include diff --git a/test/mp_assign.cpp b/test/mp_assign.cpp index 5f6ba387..f6990f54 100644 --- a/test/mp_assign.cpp +++ b/test/mp_assign.cpp @@ -6,7 +6,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_assign_2.cpp b/test/mp_assign_2.cpp index b9b2c9ca..b1779111 100644 --- a/test/mp_assign_2.cpp +++ b/test/mp_assign_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_clear.cpp b/test/mp_clear.cpp index a5652ca6..947ea316 100644 --- a/test/mp_clear.cpp +++ b/test/mp_clear.cpp @@ -6,7 +6,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_clear_2.cpp b/test/mp_clear_2.cpp index e0e1c5b6..0c7a665b 100644 --- a/test/mp_clear_2.cpp +++ b/test/mp_clear_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_empty.cpp b/test/mp_empty.cpp index 9d9b2735..23f00924 100644 --- a/test/mp_empty.cpp +++ b/test/mp_empty.cpp @@ -7,7 +7,7 @@ // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_empty_2.cpp b/test/mp_empty_2.cpp index d279ff2d..565101eb 100644 --- a/test/mp_empty_2.cpp +++ b/test/mp_empty_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_front.cpp b/test/mp_front.cpp index 686580df..12e24d54 100644 --- a/test/mp_front.cpp +++ b/test/mp_front.cpp @@ -6,7 +6,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_front_2.cpp b/test/mp_front_2.cpp index 18bf0821..e7423244 100644 --- a/test/mp_front_2.cpp +++ b/test/mp_front_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_pop_front.cpp b/test/mp_pop_front.cpp index c6cfc8ad..e906c9be 100644 --- a/test/mp_pop_front.cpp +++ b/test/mp_pop_front.cpp @@ -6,7 +6,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_pop_front_2.cpp b/test/mp_pop_front_2.cpp index a81fc065..8c42c0b1 100644 --- a/test/mp_pop_front_2.cpp +++ b/test/mp_pop_front_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_size.cpp b/test/mp_size.cpp index 61ab3d8c..55623c3a 100644 --- a/test/mp_size.cpp +++ b/test/mp_size.cpp @@ -6,7 +6,7 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; diff --git a/test/mp_size_2.cpp b/test/mp_size_2.cpp index 5b64c381..a470cdc5 100644 --- a/test/mp_size_2.cpp +++ b/test/mp_size_2.cpp @@ -11,7 +11,7 @@ int main() {} #else -#ifdef BOOST_CXX20_MODULE +#ifdef BOOST_USE_MODULES import std; import boost.core; import boost.mp11; From 05d398ea9da1bb3f5149ed8249594572d19c6ace Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 16:41:54 +0100 Subject: [PATCH 13/86] Tests: list that don't require ifdefs --- test/Jamfile | 38 ++++++++++++++++++------------------ test/mp_append.cpp | 8 ++++++++ test/mp_append_sf.cpp | 8 ++++++++ test/mp_apply_q.cpp | 8 ++++++++ test/mp_apply_q_sf.cpp | 10 +++++++++- test/mp_is_list.cpp | 8 ++++++++ test/mp_is_value_list.cpp | 9 +++++++++ test/mp_list_c.cpp | 9 ++++++++- test/mp_push_back.cpp | 8 ++++++++ test/mp_push_front.cpp | 8 ++++++++ test/mp_rename.cpp | 8 ++++++++ test/mp_replace_front.cpp | 8 ++++++++ test/mp_replace_second.cpp | 8 ++++++++ test/mp_replace_third.cpp | 8 ++++++++ test/mp_second.cpp | 8 ++++++++ test/mp_third.cpp | 8 ++++++++ test/mp_transform_front.cpp | 8 ++++++++ test/mp_transform_second.cpp | 7 +++++++ test/mp_transform_third.cpp | 8 ++++++++ 19 files changed, 164 insertions(+), 21 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 76307fea..824391c5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -31,7 +31,7 @@ project # compile mp11.cpp ; # compile complex_h.cpp ; -# # list +# list run mp_size.cpp ; run mp_size_2.cpp ; run mp_empty.cpp ; @@ -44,39 +44,39 @@ run mp_front.cpp ; run mp_front_2.cpp ; run mp_pop_front.cpp ; run mp_pop_front_2.cpp ; -# run mp_second.cpp ; +run mp_second.cpp ; # run mp_second_2.cpp ; -# run mp_third.cpp ; +run mp_third.cpp ; # run mp_third_2.cpp ; -# run mp_push_front.cpp ; +run mp_push_front.cpp ; # run mp_push_front_2.cpp ; -# run mp_push_back.cpp ; +run mp_push_back.cpp ; # run mp_push_back_2.cpp ; -# run mp_rename.cpp ; +run mp_rename.cpp ; # run mp_rename_2.cpp ; -# run mp_append.cpp ; +run mp_append.cpp ; # run mp_append_2.cpp ; # run mp_append_3.cpp ; -# run mp_append_sf.cpp ; -# run mp_replace_front.cpp ; +run mp_append_sf.cpp ; +run mp_replace_front.cpp ; # run mp_replace_front_2.cpp ; -# run mp_replace_second.cpp ; +run mp_replace_second.cpp ; # run mp_replace_second_2.cpp ; -# run mp_replace_third.cpp ; +run mp_replace_third.cpp ; # run mp_replace_third_2.cpp ; -# run mp_apply_q.cpp ; -# run mp_apply_q_sf.cpp ; -# run mp_is_list.cpp ; -# run mp_list_c.cpp ; -# run mp_transform_front.cpp ; +run mp_apply_q.cpp ; +run mp_apply_q_sf.cpp ; +run mp_is_list.cpp ; +run mp_list_c.cpp ; +run mp_transform_front.cpp ; # run mp_transform_front_2.cpp ; -# run mp_transform_second.cpp ; +run mp_transform_second.cpp ; # run mp_transform_second_2.cpp ; -# run mp_transform_third.cpp ; +run mp_transform_third.cpp ; # run mp_transform_third_2.cpp ; # run mp_list_v.cpp ; # run mp_rename_v.cpp ; -# run mp_is_value_list.cpp ; +run mp_is_value_list.cpp ; # # algorithm # run mp_transform.cpp ; diff --git a/test/mp_append.cpp b/test/mp_append.cpp index 264359a1..6b801939 100644 --- a/test/mp_append.cpp +++ b/test/mp_append.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_append_sf.cpp b/test/mp_append_sf.cpp index 80c417c1..34b6647a 100644 --- a/test/mp_append_sf.cpp +++ b/test/mp_append_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { diff --git a/test/mp_apply_q.cpp b/test/mp_apply_q.cpp index d2a47c04..2cd37c64 100644 --- a/test/mp_apply_q.cpp +++ b/test/mp_apply_q.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + template struct X {}; template using Y = X; diff --git a/test/mp_apply_q_sf.cpp b/test/mp_apply_q_sf.cpp index d30ce210..6885aeee 100644 --- a/test/mp_apply_q_sf.cpp +++ b/test/mp_apply_q_sf.cpp @@ -2,11 +2,19 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include -#include #include #include +#endif + +#include using boost::mp11::mp_apply_q; using boost::mp11::mp_list; diff --git a/test/mp_is_list.cpp b/test/mp_is_list.cpp index 5649c47b..b9612939 100644 --- a/test/mp_is_list.cpp +++ b/test/mp_is_list.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct V2 {}; diff --git a/test/mp_is_value_list.cpp b/test/mp_is_value_list.cpp index e70dc47e..ebbf6480 100644 --- a/test/mp_is_value_list.cpp +++ b/test/mp_is_value_list.cpp @@ -2,10 +2,19 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + +#include template struct V2 {}; diff --git a/test/mp_list_c.cpp b/test/mp_list_c.cpp index d6130ebf..d41da740 100644 --- a/test/mp_list_c.cpp +++ b/test/mp_list_c.cpp @@ -6,11 +6,18 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt - +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_push_back.cpp b/test/mp_push_back.cpp index c74fb031..78ba705d 100644 --- a/test/mp_push_back.cpp +++ b/test/mp_push_back.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_push_front.cpp b/test/mp_push_front.cpp index 73fcc8b7..86776894 100644 --- a/test/mp_push_front.cpp +++ b/test/mp_push_front.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_rename.cpp b/test/mp_rename.cpp index 3ad751a4..077fc5d1 100644 --- a/test/mp_rename.cpp +++ b/test/mp_rename.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct X {}; template using Y = X; diff --git a/test/mp_replace_front.cpp b/test/mp_replace_front.cpp index 07156262..435d53ed 100644 --- a/test/mp_replace_front.cpp +++ b/test/mp_replace_front.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace_second.cpp b/test/mp_replace_second.cpp index deaab1b2..8dc4d48f 100644 --- a/test/mp_replace_second.cpp +++ b/test/mp_replace_second.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace_third.cpp b/test/mp_replace_third.cpp index c1b53b53..1c797f7c 100644 --- a/test/mp_replace_third.cpp +++ b/test/mp_replace_third.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_second.cpp b/test/mp_second.cpp index f585bea4..816cf134 100644 --- a/test/mp_second.cpp +++ b/test/mp_second.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_third.cpp b/test/mp_third.cpp index c43b85da..f385c367 100644 --- a/test/mp_third.cpp +++ b/test/mp_third.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_transform_front.cpp b/test/mp_transform_front.cpp index 8711128f..53c1ecb7 100644 --- a/test/mp_transform_front.cpp +++ b/test/mp_transform_front.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_second.cpp b/test/mp_transform_second.cpp index f51dcbb5..f941ccce 100644 --- a/test/mp_transform_second.cpp +++ b/test/mp_transform_second.cpp @@ -7,12 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_third.cpp b/test/mp_transform_third.cpp index 7f537673..17ee835b 100644 --- a/test/mp_transform_third.cpp +++ b/test/mp_transform_third.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; From df6c0267f02c9b0af9590c66776a73db37070ce3 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:02:31 +0100 Subject: [PATCH 14/86] Missing exports in bind and mp_plus --- include/boost/mp11/bind.hpp | 34 +++++++++++++-------------- include/boost/mp11/detail/mp_plus.hpp | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 40ca943a..3549b444 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -26,7 +26,7 @@ namespace mp11 { // mp_bind_front -template class F, class... T> struct mp_bind_front +BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind_front { // the indirection through mp_defer works around the language inability // to expand U... into a fixed parameter list of an alias template @@ -34,34 +34,34 @@ template class F, class... T> struct mp_bind_front template using fn = typename mp_defer::type; }; -template using mp_bind_front_q = mp_bind_front; +BOOST_MODULE_EXPORT template using mp_bind_front_q = mp_bind_front; // mp_bind_back -template class F, class... T> struct mp_bind_back +BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind_back { template using fn = typename mp_defer::type; }; -template using mp_bind_back_q = mp_bind_back; +BOOST_MODULE_EXPORT template using mp_bind_back_q = mp_bind_back; // mp_arg -template struct mp_arg +BOOST_MODULE_EXPORT template struct mp_arg { template using fn = mp_at_c, I>; }; -using _1 = mp_arg<0>; -using _2 = mp_arg<1>; -using _3 = mp_arg<2>; -using _4 = mp_arg<3>; -using _5 = mp_arg<4>; -using _6 = mp_arg<5>; -using _7 = mp_arg<6>; -using _8 = mp_arg<7>; -using _9 = mp_arg<8>; +BOOST_MODULE_EXPORT using _1 = mp_arg<0>; +BOOST_MODULE_EXPORT using _2 = mp_arg<1>; +BOOST_MODULE_EXPORT using _3 = mp_arg<2>; +BOOST_MODULE_EXPORT using _4 = mp_arg<3>; +BOOST_MODULE_EXPORT using _5 = mp_arg<4>; +BOOST_MODULE_EXPORT using _6 = mp_arg<5>; +BOOST_MODULE_EXPORT using _7 = mp_arg<6>; +BOOST_MODULE_EXPORT using _8 = mp_arg<7>; +BOOST_MODULE_EXPORT using _9 = mp_arg<8>; // mp_bind -template class F, class... T> struct mp_bind; +BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind; namespace detail { @@ -93,7 +93,7 @@ template class F, class... U, class... T> struct eval_bound_a } // namespace detail -template class F, class... T> struct mp_bind +BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind { #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, == 1915 ) private: @@ -111,7 +111,7 @@ template class F, class... T> struct mp_bind #endif }; -template using mp_bind_q = mp_bind; +BOOST_MODULE_EXPORT template using mp_bind_q = mp_bind; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index 70eb26ef..83f9acfb 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -79,7 +79,7 @@ template using mp_plus = typename detail::mp_plus_impl::type; +BOOST_MODULE_EXPORT template using mp_plus = typename detail::mp_plus_impl::type; } // namespace mp11 } // namespace boost From 252ddc799eeb9a6c7779aab7c26eded0d6065f6c Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:16:31 +0100 Subject: [PATCH 15/86] Tests: algorithm 1 --- include/boost/mp11/integer_sequence.hpp | 12 +- test/Jamfile | 160 ++++++++++++------------ test/mp_all_of.cpp | 8 ++ test/mp_all_of_q.cpp | 8 ++ test/mp_any_of.cpp | 8 ++ test/mp_any_of_q.cpp | 8 ++ test/mp_at.cpp | 8 ++ test/mp_back.cpp | 8 ++ test/mp_contains.cpp | 8 ++ test/mp_copy_if.cpp | 8 ++ test/mp_copy_if_q.cpp | 8 ++ test/mp_count.cpp | 8 ++ test/mp_count_if.cpp | 8 ++ test/mp_count_if_q.cpp | 8 ++ test/mp_drop.cpp | 8 ++ test/mp_erase.cpp | 8 ++ test/mp_fill.cpp | 7 ++ test/mp_filter.cpp | 7 ++ test/mp_find.cpp | 9 ++ test/mp_find_if.cpp | 8 ++ test/mp_find_if_q.cpp | 10 ++ test/mp_flatten.cpp | 8 ++ test/mp_fold.cpp | 10 ++ test/mp_fold_q.cpp | 8 ++ test/mp_fold_q_sf.cpp | 11 +- test/mp_for_each.cpp | 8 ++ test/mp_from_sequence.cpp | 8 ++ test/mp_insert.cpp | 8 ++ test/mp_intersperse.cpp | 8 ++ test/mp_iota.cpp | 8 ++ test/mp_iterate.cpp | 10 ++ test/mp_join.cpp | 8 ++ test/mp_max_element.cpp | 8 ++ test/mp_max_element_q.cpp | 8 ++ test/mp_min_element.cpp | 8 ++ test/mp_min_element_q.cpp | 8 ++ test/mp_none_of.cpp | 8 ++ test/mp_none_of_q.cpp | 8 ++ test/mp_nth_element.cpp | 8 ++ test/mp_nth_element_q.cpp | 8 ++ test/mp_pairwise_fold.cpp | 8 ++ test/mp_pairwise_fold_q.cpp | 8 ++ test/mp_partial_sum.cpp | 8 ++ test/mp_partition.cpp | 8 ++ test/mp_partition_q.cpp | 8 ++ test/mp_pop_back.cpp | 8 ++ test/mp_power_set.cpp | 8 ++ test/mp_product.cpp | 8 ++ test/mp_remove.cpp | 8 ++ test/mp_remove_if.cpp | 8 ++ test/mp_remove_if_q.cpp | 8 ++ test/mp_repeat.cpp | 8 ++ test/mp_replace.cpp | 8 ++ test/mp_replace_at.cpp | 8 ++ test/mp_replace_at_c.cpp | 8 ++ test/mp_replace_if.cpp | 8 ++ test/mp_replace_if_q.cpp | 8 ++ test/mp_reverse.cpp | 8 ++ test/mp_reverse_fold.cpp | 8 ++ test/mp_reverse_fold_q.cpp | 8 ++ test/mp_rotate_left.cpp | 8 ++ test/mp_rotate_right.cpp | 8 ++ test/mp_slice.cpp | 8 ++ test/mp_sliding_fold.cpp | 9 ++ test/mp_sliding_fold_q.cpp | 10 ++ test/mp_sort.cpp | 8 ++ test/mp_sort_q.cpp | 8 ++ test/mp_split.cpp | 8 ++ test/mp_starts_with.cpp | 8 ++ test/mp_starts_with_sf.cpp | 8 ++ test/mp_take.cpp | 8 ++ test/mp_transform.cpp | 8 ++ test/mp_transform_if.cpp | 8 ++ test/mp_transform_if_q.cpp | 8 ++ test/mp_transform_q.cpp | 8 ++ test/mp_transform_sf.cpp | 10 +- test/mp_unique.cpp | 8 ++ test/mp_unique_if.cpp | 7 ++ test/mp_unique_if_q.cpp | 7 ++ test/mp_with_index.cpp | 8 ++ test/mp_with_index_cx.cpp | 6 +- 81 files changed, 724 insertions(+), 89 deletions(-) diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index b9052fec..79947dfa 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -31,13 +31,13 @@ namespace mp11 { // integer_sequence -template struct integer_sequence +BOOST_MODULE_EXPORT template struct integer_sequence { }; #if defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) -template using make_integer_sequence = __make_integer_seq; +BOOST_MODULE_EXPORT template using make_integer_sequence = __make_integer_seq; #else @@ -101,18 +101,18 @@ template struct make_integer_sequence_impl: iseq_if_c using make_integer_sequence = typename detail::make_integer_sequence_impl::type; +BOOST_MODULE_EXPORT template using make_integer_sequence = typename detail::make_integer_sequence_impl::type; #endif // defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) // index_sequence -template using index_sequence = integer_sequence; +BOOST_MODULE_EXPORT template using index_sequence = integer_sequence; // make_index_sequence -template using make_index_sequence = make_integer_sequence; +BOOST_MODULE_EXPORT template using make_index_sequence = make_integer_sequence; // index_sequence_for -template using index_sequence_for = make_integer_sequence; +BOOST_MODULE_EXPORT template using index_sequence_for = make_integer_sequence; } // namespace mp11 } // namespace boost diff --git a/test/Jamfile b/test/Jamfile index 824391c5..9b86534d 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -78,106 +78,106 @@ run mp_transform_third.cpp ; # run mp_rename_v.cpp ; run mp_is_value_list.cpp ; -# # algorithm -# run mp_transform.cpp ; +# algorithm +run mp_transform.cpp ; # run mp_transform_2.cpp ; -# run mp_transform_q.cpp ; +run mp_transform_q.cpp ; # run mp_transform_q_2.cpp ; -# run mp_transform_sf.cpp ; -# run mp_transform_if.cpp ; -# run mp_transform_if_q.cpp ; -# run mp_filter.cpp ; -# run mp_fill.cpp ; +run mp_transform_sf.cpp ; +run mp_transform_if.cpp ; +run mp_transform_if_q.cpp ; +run mp_filter.cpp ; +run mp_fill.cpp ; # run mp_fill_2.cpp ; -# run mp_count.cpp ; -# run mp_count_if.cpp ; -# run mp_count_if_q.cpp ; -# run mp_contains.cpp ; -# run mp_starts_with.cpp ; -# run mp_starts_with_sf.cpp ; -# run mp_repeat.cpp ; +run mp_count.cpp ; +run mp_count_if.cpp ; +run mp_count_if_q.cpp ; +run mp_contains.cpp ; +run mp_starts_with.cpp ; +run mp_starts_with_sf.cpp ; +run mp_repeat.cpp ; # run mp_repeat_2.cpp ; # run mp_repeat_3.cpp ; -# run mp_product.cpp ; -# run mp_drop.cpp ; +run mp_product.cpp ; +run mp_drop.cpp ; # run mp_drop_2.cpp ; -# run mp_iota.cpp ; +run mp_iota.cpp ; # run mp_iota_2.cpp ; -# run mp_at.cpp ; +run mp_at.cpp ; # run mp_at_2.cpp ; # run mp_at_sf.cpp : : : gcc-4.7:all ; -# run mp_take.cpp ; +run mp_take.cpp ; # run mp_take_2.cpp ; -# run mp_slice.cpp ; +run mp_slice.cpp ; # run mp_slice_2.cpp ; -# run mp_replace.cpp ; -# run mp_replace_if.cpp ; -# run mp_replace_if_q.cpp ; -# run mp_copy_if.cpp ; -# run mp_copy_if_q.cpp ; -# run mp_remove.cpp ; -# run mp_remove_if.cpp ; -# run mp_remove_if_q.cpp ; -# run mp_partition.cpp ; -# run mp_partition_q.cpp ; -# run mp_sort.cpp ; -# run mp_sort_q.cpp ; -# run mp_find.cpp ; -# run mp_find_if.cpp ; -# run mp_find_if_q.cpp ; -# run mp_reverse.cpp ; -# run mp_fold.cpp ; -# run mp_fold_q.cpp ; -# run mp_fold_q_sf.cpp ; -# run mp_reverse_fold.cpp ; -# run mp_reverse_fold_q.cpp ; -# run mp_unique.cpp ; -# run mp_unique_if.cpp ; -# run mp_unique_if_q.cpp ; -# run mp_all_of.cpp ; -# run mp_all_of_q.cpp ; -# run mp_any_of.cpp ; -# run mp_any_of_q.cpp ; -# run mp_none_of.cpp ; -# run mp_none_of_q.cpp ; -# run mp_replace_at.cpp ; -# run mp_replace_at_c.cpp ; -# run mp_for_each.cpp ; -# run mp_insert.cpp ; +run mp_replace.cpp ; +run mp_replace_if.cpp ; +run mp_replace_if_q.cpp ; +run mp_copy_if.cpp ; +run mp_copy_if_q.cpp ; +run mp_remove.cpp ; +run mp_remove_if.cpp ; +run mp_remove_if_q.cpp ; +run mp_partition.cpp ; +run mp_partition_q.cpp ; +run mp_sort.cpp ; +run mp_sort_q.cpp ; +run mp_find.cpp ; +run mp_find_if.cpp ; +run mp_find_if_q.cpp ; +run mp_reverse.cpp ; +run mp_fold.cpp ; +run mp_fold_q.cpp ; +run mp_fold_q_sf.cpp ; +run mp_reverse_fold.cpp ; +run mp_reverse_fold_q.cpp ; +run mp_unique.cpp ; +run mp_unique_if.cpp ; +run mp_unique_if_q.cpp ; +run mp_all_of.cpp ; +run mp_all_of_q.cpp ; +run mp_any_of.cpp ; +run mp_any_of_q.cpp ; +run mp_none_of.cpp ; +run mp_none_of_q.cpp ; +run mp_replace_at.cpp ; +run mp_replace_at_c.cpp ; +run mp_for_each.cpp ; +run mp_insert.cpp ; # run mp_insert_2.cpp ; -# run mp_erase.cpp ; +run mp_erase.cpp ; # run mp_erase_2.cpp ; -# run mp_with_index.cpp ; -# run mp_with_index_cx.cpp ; -# run mp_from_sequence.cpp ; +run mp_with_index.cpp ; +run mp_with_index_cx.cpp ; +run mp_from_sequence.cpp ; # run mp_from_sequence_2.cpp ; -# run mp_min_element.cpp ; +run mp_min_element.cpp ; # run mp_min_element_2.cpp ; -# run mp_min_element_q.cpp ; +run mp_min_element_q.cpp ; # run mp_min_element_q_2.cpp ; -# run mp_max_element.cpp ; +run mp_max_element.cpp ; # run mp_max_element_2.cpp ; -# run mp_max_element_q.cpp ; +run mp_max_element_q.cpp ; # run mp_max_element_q_2.cpp ; -# run mp_nth_element.cpp ; -# run mp_nth_element_q.cpp ; -# run mp_back.cpp ; +run mp_nth_element.cpp ; +run mp_nth_element_q.cpp ; +run mp_back.cpp ; # run mp_back_2.cpp ; -# run mp_pop_back.cpp ; +run mp_pop_back.cpp ; # run mp_pop_back_2.cpp ; -# run mp_flatten.cpp ; -# run mp_rotate_left.cpp ; -# run mp_rotate_right.cpp ; -# run mp_power_set.cpp ; -# run mp_partial_sum.cpp ; -# run mp_iterate.cpp ; -# run mp_pairwise_fold.cpp ; -# run mp_pairwise_fold_q.cpp ; -# run mp_sliding_fold.cpp ; -# run mp_sliding_fold_q.cpp ; -# run mp_intersperse.cpp ; -# run mp_split.cpp ; -# run mp_join.cpp ; +run mp_flatten.cpp ; +run mp_rotate_left.cpp ; +run mp_rotate_right.cpp ; +run mp_power_set.cpp ; +run mp_partial_sum.cpp ; +run mp_iterate.cpp ; +run mp_pairwise_fold.cpp ; +run mp_pairwise_fold_q.cpp ; +run mp_sliding_fold.cpp ; +run mp_sliding_fold_q.cpp ; +run mp_intersperse.cpp ; +run mp_split.cpp ; +run mp_join.cpp ; # # integral # run integral.cpp ; diff --git a/test/mp_all_of.cpp b/test/mp_all_of.cpp index 8818f90a..41545805 100644 --- a/test/mp_all_of.cpp +++ b/test/mp_all_of.cpp @@ -12,6 +12,12 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_all_of_q.cpp b/test/mp_all_of_q.cpp index 8a877c55..2ca1f754 100644 --- a/test/mp_all_of_q.cpp +++ b/test/mp_all_of_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_any_of.cpp b/test/mp_any_of.cpp index 8fb7d2ae..d2a3eac7 100644 --- a/test/mp_any_of.cpp +++ b/test/mp_any_of.cpp @@ -12,6 +12,12 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_any_of_q.cpp b/test/mp_any_of_q.cpp index 17b50dcf..e415541c 100644 --- a/test/mp_any_of_q.cpp +++ b/test/mp_any_of_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_at.cpp b/test/mp_at.cpp index 6ff3fd43..5dab4876 100644 --- a/test/mp_at.cpp +++ b/test/mp_at.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_back.cpp b/test/mp_back.cpp index 457364ee..792737f3 100644 --- a/test/mp_back.cpp +++ b/test/mp_back.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_contains.cpp b/test/mp_contains.cpp index 04bfac64..bb0d5544 100644 --- a/test/mp_contains.cpp +++ b/test/mp_contains.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_copy_if.cpp b/test/mp_copy_if.cpp index 0cf54d49..69a58161 100644 --- a/test/mp_copy_if.cpp +++ b/test/mp_copy_if.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_copy_if_q.cpp b/test/mp_copy_if_q.cpp index ef75db22..cb058d38 100644 --- a/test/mp_copy_if_q.cpp +++ b/test/mp_copy_if_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_count.cpp b/test/mp_count.cpp index f1722744..86bb1180 100644 --- a/test/mp_count.cpp +++ b/test/mp_count.cpp @@ -13,6 +13,12 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -20,6 +26,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_count_if.cpp b/test/mp_count_if.cpp index 911bcf05..1f87989b 100644 --- a/test/mp_count_if.cpp +++ b/test/mp_count_if.cpp @@ -12,6 +12,12 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_count_if_q.cpp b/test/mp_count_if_q.cpp index d76ab4d2..f898a319 100644 --- a/test/mp_count_if_q.cpp +++ b/test/mp_count_if_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_drop.cpp b/test/mp_drop.cpp index 40167fbc..fb7a537b 100644 --- a/test/mp_drop.cpp +++ b/test/mp_drop.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_erase.cpp b/test/mp_erase.cpp index 10e9638c..2ae56cb3 100644 --- a/test/mp_erase.cpp +++ b/test/mp_erase.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_fill.cpp b/test/mp_fill.cpp index 1b5fc2ef..b7a2c135 100644 --- a/test/mp_fill.cpp +++ b/test/mp_fill.cpp @@ -7,12 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif struct X1 {}; diff --git a/test/mp_filter.cpp b/test/mp_filter.cpp index 6a2ea13f..475bfd1d 100644 --- a/test/mp_filter.cpp +++ b/test/mp_filter.cpp @@ -7,10 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif using boost::mp11::mp_int; diff --git a/test/mp_find.cpp b/test/mp_find.cpp index 91cef39d..b2c364c0 100644 --- a/test/mp_find.cpp +++ b/test/mp_find.cpp @@ -2,6 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -9,6 +15,9 @@ #include #include #include +#endif + +#include struct X1 {}; struct X2 {}; diff --git a/test/mp_find_if.cpp b/test/mp_find_if.cpp index 6310390e..82a6f314 100644 --- a/test/mp_find_if.cpp +++ b/test/mp_find_if.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_find_if_q.cpp b/test/mp_find_if_q.cpp index 360b2664..4f82de88 100644 --- a/test/mp_find_if_q.cpp +++ b/test/mp_find_if_q.cpp @@ -2,6 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -11,6 +17,10 @@ #include #include #include +#endif + +#include + struct X1 {}; diff --git a/test/mp_flatten.cpp b/test/mp_flatten.cpp index 403b870a..dc1e5bf9 100644 --- a/test/mp_flatten.cpp +++ b/test/mp_flatten.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_fold.cpp b/test/mp_fold.cpp index 5c84ede0..6fbbe3f2 100644 --- a/test/mp_fold.cpp +++ b/test/mp_fold.cpp @@ -7,12 +7,22 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include + struct X1 {}; struct X2 {}; diff --git a/test/mp_fold_q.cpp b/test/mp_fold_q.cpp index 475cf082..30343cca 100644 --- a/test/mp_fold_q.cpp +++ b/test/mp_fold_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_fold_q_sf.cpp b/test/mp_fold_q_sf.cpp index cd116abc..0bcc4267 100644 --- a/test/mp_fold_q_sf.cpp +++ b/test/mp_fold_q_sf.cpp @@ -2,12 +2,22 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include + using boost::mp11::mp_size_t; @@ -34,7 +44,6 @@ int main() BOOST_TEST_TRAIT_FALSE((mp_valid, mp_size_t<0>, Q>)); #if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1910 ) - BOOST_TEST_TRAIT_FALSE((mp_valid, mp_size_t<0>, Q>)); BOOST_TEST_TRAIT_FALSE((mp_valid, mp_size_t<0>, Q>)); BOOST_TEST_TRAIT_FALSE((mp_valid, mp_size_t<0>, Q>)); diff --git a/test/mp_for_each.cpp b/test/mp_for_each.cpp index 1842d5a0..7daec54a 100644 --- a/test/mp_for_each.cpp +++ b/test/mp_for_each.cpp @@ -15,11 +15,19 @@ # pragma warning( disable: 4267 ) // conversion from size_t to uint32_t #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + #if defined( BOOST_MP11_HAS_CXX14_CONSTEXPR ) # define CONSTEXPR14 constexpr diff --git a/test/mp_from_sequence.cpp b/test/mp_from_sequence.cpp index a06d9282..53d932a7 100644 --- a/test/mp_from_sequence.cpp +++ b/test/mp_from_sequence.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct S; diff --git a/test/mp_insert.cpp b/test/mp_insert.cpp index da5bc69b..73316005 100644 --- a/test/mp_insert.cpp +++ b/test/mp_insert.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_intersperse.cpp b/test/mp_intersperse.cpp index 5a5ef161..4dc5754b 100644 --- a/test/mp_intersperse.cpp +++ b/test/mp_intersperse.cpp @@ -2,12 +2,20 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_iota.cpp b/test/mp_iota.cpp index 044251d6..4a064ecd 100644 --- a/test/mp_iota.cpp +++ b/test/mp_iota.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_iterate.cpp b/test/mp_iterate.cpp index a0d1cb26..c17a26d6 100644 --- a/test/mp_iterate.cpp +++ b/test/mp_iterate.cpp @@ -2,12 +2,22 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include + struct X1 {}; struct X2 { using first_type = double; using next_type = X1; }; diff --git a/test/mp_join.cpp b/test/mp_join.cpp index 1f4b986c..aa2a665c 100644 --- a/test/mp_join.cpp +++ b/test/mp_join.cpp @@ -2,12 +2,20 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_max_element.cpp b/test/mp_max_element.cpp index 18550290..e5f8366a 100644 --- a/test/mp_max_element.cpp +++ b/test/mp_max_element.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_max_element_q.cpp b/test/mp_max_element_q.cpp index 36a79c4c..6e721f20 100644 --- a/test/mp_max_element_q.cpp +++ b/test/mp_max_element_q.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_min_element.cpp b/test/mp_min_element.cpp index 3a4451e0..cfb1761d 100644 --- a/test/mp_min_element.cpp +++ b/test/mp_min_element.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_min_element_q.cpp b/test/mp_min_element_q.cpp index b1a09202..39c5d160 100644 --- a/test/mp_min_element_q.cpp +++ b/test/mp_min_element_q.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_none_of.cpp b/test/mp_none_of.cpp index ab9ca3b0..13112905 100644 --- a/test/mp_none_of.cpp +++ b/test/mp_none_of.cpp @@ -12,6 +12,12 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_none_of_q.cpp b/test/mp_none_of_q.cpp index dd4ba636..4fc447b8 100644 --- a/test/mp_none_of_q.cpp +++ b/test/mp_none_of_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_nth_element.cpp b/test/mp_nth_element.cpp index 8a077d7c..63331b6f 100644 --- a/test/mp_nth_element.cpp +++ b/test/mp_nth_element.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_nth_element_q.cpp b/test/mp_nth_element_q.cpp index 0c6a333f..6a3bf06c 100644 --- a/test/mp_nth_element_q.cpp +++ b/test/mp_nth_element_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_pairwise_fold.cpp b/test/mp_pairwise_fold.cpp index 48141a7e..777a79fd 100644 --- a/test/mp_pairwise_fold.cpp +++ b/test/mp_pairwise_fold.cpp @@ -2,12 +2,20 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_pairwise_fold_q.cpp b/test/mp_pairwise_fold_q.cpp index b7e995a5..68e4475a 100644 --- a/test/mp_pairwise_fold_q.cpp +++ b/test/mp_pairwise_fold_q.cpp @@ -2,8 +2,16 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include +#endif + using namespace boost::mp11; diff --git a/test/mp_partial_sum.cpp b/test/mp_partial_sum.cpp index 75366b0f..3975f9a0 100644 --- a/test/mp_partial_sum.cpp +++ b/test/mp_partial_sum.cpp @@ -2,6 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -10,6 +16,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_partition.cpp b/test/mp_partition.cpp index 8dc1ac2b..4124907a 100644 --- a/test/mp_partition.cpp +++ b/test/mp_partition.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_partition_q.cpp b/test/mp_partition_q.cpp index fc04c52d..c2851f34 100644 --- a/test/mp_partition_q.cpp +++ b/test/mp_partition_q.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_pop_back.cpp b/test/mp_pop_back.cpp index 554da9ed..5a663d6a 100644 --- a/test/mp_pop_back.cpp +++ b/test/mp_pop_back.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_power_set.cpp b/test/mp_power_set.cpp index 250bfbb0..7ae6ccb3 100644 --- a/test/mp_power_set.cpp +++ b/test/mp_power_set.cpp @@ -2,11 +2,19 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_product.cpp b/test/mp_product.cpp index f00bc40f..8ccf5178 100644 --- a/test/mp_product.cpp +++ b/test/mp_product.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_remove.cpp b/test/mp_remove.cpp index 87d9c617..a3fa3643 100644 --- a/test/mp_remove.cpp +++ b/test/mp_remove.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_remove_if.cpp b/test/mp_remove_if.cpp index 883bf6cc..a20057b2 100644 --- a/test/mp_remove_if.cpp +++ b/test/mp_remove_if.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_remove_if_q.cpp b/test/mp_remove_if_q.cpp index 818cc63d..1c942d61 100644 --- a/test/mp_remove_if_q.cpp +++ b/test/mp_remove_if_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_repeat.cpp b/test/mp_repeat.cpp index 574b4fe8..c2e9a95a 100644 --- a/test/mp_repeat.cpp +++ b/test/mp_repeat.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace.cpp b/test/mp_replace.cpp index 36a0ac6f..5a4ad384 100644 --- a/test/mp_replace.cpp +++ b/test/mp_replace.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace_at.cpp b/test/mp_replace_at.cpp index dfd66e11..57b8198d 100644 --- a/test/mp_replace_at.cpp +++ b/test/mp_replace_at.cpp @@ -11,6 +11,12 @@ #pragma warning( disable: 4804 ) // '>=': unsafe use of type 'bool' in operation #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -18,6 +24,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace_at_c.cpp b/test/mp_replace_at_c.cpp index 5a5bd54b..b90a8b91 100644 --- a/test/mp_replace_at_c.cpp +++ b/test/mp_replace_at_c.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_replace_if.cpp b/test/mp_replace_if.cpp index 98845d3f..9648fa63 100644 --- a/test/mp_replace_if.cpp +++ b/test/mp_replace_if.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_replace_if_q.cpp b/test/mp_replace_if_q.cpp index a692673f..0521829b 100644 --- a/test/mp_replace_if_q.cpp +++ b/test/mp_replace_if_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; diff --git a/test/mp_reverse.cpp b/test/mp_reverse.cpp index 221440db..3f171f3e 100644 --- a/test/mp_reverse.cpp +++ b/test/mp_reverse.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_reverse_fold.cpp b/test/mp_reverse_fold.cpp index 75c30899..cd57d933 100644 --- a/test/mp_reverse_fold.cpp +++ b/test/mp_reverse_fold.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_reverse_fold_q.cpp b/test/mp_reverse_fold_q.cpp index 09071a8d..17e675ca 100644 --- a/test/mp_reverse_fold_q.cpp +++ b/test/mp_reverse_fold_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_rotate_left.cpp b/test/mp_rotate_left.cpp index 0735eed8..270584c6 100644 --- a/test/mp_rotate_left.cpp +++ b/test/mp_rotate_left.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_rotate_right.cpp b/test/mp_rotate_right.cpp index 14ac5d4c..1a4fb383 100644 --- a/test/mp_rotate_right.cpp +++ b/test/mp_rotate_right.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_slice.cpp b/test/mp_slice.cpp index 867eb55b..9751dd11 100644 --- a/test/mp_slice.cpp +++ b/test/mp_slice.cpp @@ -5,11 +5,19 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_sliding_fold.cpp b/test/mp_sliding_fold.cpp index ba6ee2bb..6d43ad8f 100644 --- a/test/mp_sliding_fold.cpp +++ b/test/mp_sliding_fold.cpp @@ -5,12 +5,21 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include struct X1 {}; struct X2 {}; diff --git a/test/mp_sliding_fold_q.cpp b/test/mp_sliding_fold_q.cpp index 87794c93..4750c61b 100644 --- a/test/mp_sliding_fold_q.cpp +++ b/test/mp_sliding_fold_q.cpp @@ -5,12 +5,22 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include + struct X1 {}; struct X2 {}; diff --git a/test/mp_sort.cpp b/test/mp_sort.cpp index d6b677f4..06e2ec7b 100644 --- a/test/mp_sort.cpp +++ b/test/mp_sort.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_sort_q.cpp b/test/mp_sort_q.cpp index 84f8b455..4bc0af04 100644 --- a/test/mp_sort_q.cpp +++ b/test/mp_sort_q.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + using boost::mp11::mp_bool; diff --git a/test/mp_split.cpp b/test/mp_split.cpp index 0cea0725..d7b05d8f 100644 --- a/test/mp_split.cpp +++ b/test/mp_split.cpp @@ -2,12 +2,20 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_starts_with.cpp b/test/mp_starts_with.cpp index 88012201..9736aa8a 100644 --- a/test/mp_starts_with.cpp +++ b/test/mp_starts_with.cpp @@ -6,6 +6,12 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -13,6 +19,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_starts_with_sf.cpp b/test/mp_starts_with_sf.cpp index 40d757eb..54766288 100644 --- a/test/mp_starts_with_sf.cpp +++ b/test/mp_starts_with_sf.cpp @@ -6,10 +6,18 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_take.cpp b/test/mp_take.cpp index c7f04227..6ede2a22 100644 --- a/test/mp_take.cpp +++ b/test/mp_take.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform.cpp b/test/mp_transform.cpp index ed6f1dde..af862fe5 100644 --- a/test/mp_transform.cpp +++ b/test/mp_transform.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_if.cpp b/test/mp_transform_if.cpp index 048909aa..a1850499 100644 --- a/test/mp_transform_if.cpp +++ b/test/mp_transform_if.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_if_q.cpp b/test/mp_transform_if_q.cpp index b2087be8..06623f74 100644 --- a/test/mp_transform_if_q.cpp +++ b/test/mp_transform_if_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -15,6 +21,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_q.cpp b/test/mp_transform_q.cpp index 6c73cb1d..0a7d900e 100644 --- a/test/mp_transform_q.cpp +++ b/test/mp_transform_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_transform_sf.cpp b/test/mp_transform_sf.cpp index e4f5515d..fc7cae51 100644 --- a/test/mp_transform_sf.cpp +++ b/test/mp_transform_sf.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include -#include #include +#endif + +#include using boost::mp11::mp_transform; using boost::mp11::mp_list; diff --git a/test/mp_unique.cpp b/test/mp_unique.cpp index 697d4ce2..f97935f8 100644 --- a/test/mp_unique.cpp +++ b/test/mp_unique.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_unique_if.cpp b/test/mp_unique_if.cpp index 3e579a6b..185daf8b 100644 --- a/test/mp_unique_if.cpp +++ b/test/mp_unique_if.cpp @@ -12,6 +12,12 @@ # pragma GCC diagnostic ignored "-Wsign-compare" #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,7 @@ #include #include #include +#endif using boost::mp11::mp_bool; diff --git a/test/mp_unique_if_q.cpp b/test/mp_unique_if_q.cpp index 10fc4796..35c9c4b2 100644 --- a/test/mp_unique_if_q.cpp +++ b/test/mp_unique_if_q.cpp @@ -12,6 +12,12 @@ # pragma GCC diagnostic ignored "-Wsign-compare" #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -19,6 +25,7 @@ #include #include #include +#endif using boost::mp11::mp_bool; diff --git a/test/mp_with_index.cpp b/test/mp_with_index.cpp index 85a142d1..dcac9177 100644 --- a/test/mp_with_index.cpp +++ b/test/mp_with_index.cpp @@ -13,10 +13,18 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + using boost::mp11::mp_size_t; using boost::mp11::mp_for_each; diff --git a/test/mp_with_index_cx.cpp b/test/mp_with_index_cx.cpp index 3be9c2cf..881a9535 100644 --- a/test/mp_with_index_cx.cpp +++ b/test/mp_with_index_cx.cpp @@ -14,8 +14,12 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.mp11; +#else #include -#include +#endif using boost::mp11::mp_size_t; using boost::mp11::mp_with_index; From 4283284ecc602484ccb3949c66d3e65d91dbf742 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:23:42 +0100 Subject: [PATCH 16/86] Finished list tests --- test/Jamfile | 30 +++++++++++++++--------------- test/mp_append_2.cpp | 8 ++++++++ test/mp_append_3.cpp | 11 ++++++++++- test/mp_list_v.cpp | 11 ++++++++++- test/mp_push_back_2.cpp | 11 ++++++++++- test/mp_push_front_2.cpp | 11 ++++++++++- test/mp_rename_2.cpp | 11 ++++++++++- test/mp_rename_v.cpp | 11 ++++++++++- test/mp_replace_front_2.cpp | 11 ++++++++++- test/mp_replace_second_2.cpp | 11 ++++++++++- test/mp_replace_third_2.cpp | 11 ++++++++++- test/mp_second_2.cpp | 11 ++++++++++- test/mp_third_2.cpp | 11 ++++++++++- test/mp_transform_front_2.cpp | 11 ++++++++++- test/mp_transform_second_2.cpp | 11 ++++++++++- test/mp_transform_third_2.cpp | 11 ++++++++++- 16 files changed, 163 insertions(+), 29 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 9b86534d..88e0230e 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -45,37 +45,37 @@ run mp_front_2.cpp ; run mp_pop_front.cpp ; run mp_pop_front_2.cpp ; run mp_second.cpp ; -# run mp_second_2.cpp ; +run mp_second_2.cpp ; run mp_third.cpp ; -# run mp_third_2.cpp ; +run mp_third_2.cpp ; run mp_push_front.cpp ; -# run mp_push_front_2.cpp ; +run mp_push_front_2.cpp ; run mp_push_back.cpp ; -# run mp_push_back_2.cpp ; +run mp_push_back_2.cpp ; run mp_rename.cpp ; -# run mp_rename_2.cpp ; +run mp_rename_2.cpp ; run mp_append.cpp ; -# run mp_append_2.cpp ; -# run mp_append_3.cpp ; +run mp_append_2.cpp ; +run mp_append_3.cpp ; run mp_append_sf.cpp ; run mp_replace_front.cpp ; -# run mp_replace_front_2.cpp ; +run mp_replace_front_2.cpp ; run mp_replace_second.cpp ; -# run mp_replace_second_2.cpp ; +run mp_replace_second_2.cpp ; run mp_replace_third.cpp ; -# run mp_replace_third_2.cpp ; +run mp_replace_third_2.cpp ; run mp_apply_q.cpp ; run mp_apply_q_sf.cpp ; run mp_is_list.cpp ; run mp_list_c.cpp ; run mp_transform_front.cpp ; -# run mp_transform_front_2.cpp ; +run mp_transform_front_2.cpp ; run mp_transform_second.cpp ; -# run mp_transform_second_2.cpp ; +run mp_transform_second_2.cpp ; run mp_transform_third.cpp ; -# run mp_transform_third_2.cpp ; -# run mp_list_v.cpp ; -# run mp_rename_v.cpp ; +run mp_transform_third_2.cpp ; +run mp_list_v.cpp ; +run mp_rename_v.cpp ; run mp_is_value_list.cpp ; # algorithm diff --git a/test/mp_append_2.cpp b/test/mp_append_2.cpp index 4b3bebd4..ff01543d 100644 --- a/test/mp_append_2.cpp +++ b/test/mp_append_2.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + template struct W; diff --git a/test/mp_append_3.cpp b/test/mp_append_3.cpp index 2f134e66..82b201cc 100644 --- a/test/mp_append_3.cpp +++ b/test/mp_append_3.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,7 +11,16 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_list_v.cpp b/test/mp_list_v.cpp index c279b46d..2b9f1c13 100644 --- a/test/mp_list_v.cpp +++ b/test/mp_list_v.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,7 +11,16 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include +#endif + template bool is_value_list( L const& ) { return false; } template class L, auto... A> bool is_value_list( L const& ) { return true; } diff --git a/test/mp_push_back_2.cpp b/test/mp_push_back_2.cpp index 2a7a3c15..7b48c551 100644 --- a/test/mp_push_back_2.cpp +++ b/test/mp_push_back_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_push_front_2.cpp b/test/mp_push_front_2.cpp index b15ad546..62ca05de 100644 --- a/test/mp_push_front_2.cpp +++ b/test/mp_push_front_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_rename_2.cpp b/test/mp_rename_2.cpp index ef63f8a2..f665217f 100644 --- a/test/mp_rename_2.cpp +++ b/test/mp_rename_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_rename_v.cpp b/test/mp_rename_v.cpp index 13103aea..4d2cf92f 100644 --- a/test/mp_rename_v.cpp +++ b/test/mp_rename_v.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_replace_front_2.cpp b/test/mp_replace_front_2.cpp index 4649bf28..f90c10da 100644 --- a/test/mp_replace_front_2.cpp +++ b/test/mp_replace_front_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_replace_second_2.cpp b/test/mp_replace_second_2.cpp index 783ee8cb..6f5c70ce 100644 --- a/test/mp_replace_second_2.cpp +++ b/test/mp_replace_second_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_replace_third_2.cpp b/test/mp_replace_third_2.cpp index 6dcc7d1b..013f338a 100644 --- a/test/mp_replace_third_2.cpp +++ b/test/mp_replace_third_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_second_2.cpp b/test/mp_second_2.cpp index 8f1b3323..a65c13b9 100644 --- a/test/mp_second_2.cpp +++ b/test/mp_second_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_third_2.cpp b/test/mp_third_2.cpp index e4f913e9..57f69667 100644 --- a/test/mp_third_2.cpp +++ b/test/mp_third_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,8 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_transform_front_2.cpp b/test/mp_transform_front_2.cpp index 6c8b2071..b3a2e895 100644 --- a/test/mp_transform_front_2.cpp +++ b/test/mp_transform_front_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,9 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_transform_second_2.cpp b/test/mp_transform_second_2.cpp index ebc24083..4dfc47b6 100644 --- a/test/mp_transform_second_2.cpp +++ b/test/mp_transform_second_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,9 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + template struct L1 {}; template struct L2 {}; diff --git a/test/mp_transform_third_2.cpp b/test/mp_transform_third_2.cpp index ac35e646..8fad1c5f 100644 --- a/test/mp_transform_third_2.cpp +++ b/test/mp_transform_third_2.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,9 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + template struct L1 {}; template struct L2 {}; From a792291ec3396bde49e8b96b40bd652d6233e196 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:33:11 +0100 Subject: [PATCH 17/86] Algorithm tests 2 --- test/Jamfile | 38 ++++++++++++++++++------------------- test/mp_at_2.cpp | 14 ++++++++++++-- test/mp_back_2.cpp | 18 ++++++++++++++---- test/mp_drop_2.cpp | 16 +++++++++++++--- test/mp_erase_2.cpp | 16 +++++++++++++--- test/mp_fill_2.cpp | 13 +++++++++++-- test/mp_from_sequence_2.cpp | 8 ++++++++ test/mp_insert_2.cpp | 16 +++++++++++++--- test/mp_iota_2.cpp | 8 ++++++++ test/mp_max_element_2.cpp | 16 +++++++++++++--- test/mp_max_element_q_2.cpp | 16 +++++++++++++--- test/mp_min_element_2.cpp | 16 +++++++++++++--- test/mp_min_element_q_2.cpp | 16 +++++++++++++--- test/mp_pop_back_2.cpp | 16 +++++++++++++--- test/mp_repeat_2.cpp | 15 ++++++++++++--- test/mp_repeat_3.cpp | 8 ++++++++ test/mp_slice_2.cpp | 16 +++++++++++++--- test/mp_take_2.cpp | 15 ++++++++++++--- test/mp_transform_2.cpp | 17 ++++++++++++++--- test/mp_transform_q_2.cpp | 9 +++++++++ 20 files changed, 244 insertions(+), 63 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 88e0230e..b1c27994 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -80,15 +80,15 @@ run mp_is_value_list.cpp ; # algorithm run mp_transform.cpp ; -# run mp_transform_2.cpp ; +run mp_transform_2.cpp ; run mp_transform_q.cpp ; -# run mp_transform_q_2.cpp ; +run mp_transform_q_2.cpp ; run mp_transform_sf.cpp ; run mp_transform_if.cpp ; run mp_transform_if_q.cpp ; run mp_filter.cpp ; run mp_fill.cpp ; -# run mp_fill_2.cpp ; +run mp_fill_2.cpp ; run mp_count.cpp ; run mp_count_if.cpp ; run mp_count_if_q.cpp ; @@ -96,20 +96,20 @@ run mp_contains.cpp ; run mp_starts_with.cpp ; run mp_starts_with_sf.cpp ; run mp_repeat.cpp ; -# run mp_repeat_2.cpp ; -# run mp_repeat_3.cpp ; +run mp_repeat_2.cpp ; +run mp_repeat_3.cpp ; run mp_product.cpp ; run mp_drop.cpp ; -# run mp_drop_2.cpp ; +run mp_drop_2.cpp ; run mp_iota.cpp ; -# run mp_iota_2.cpp ; +run mp_iota_2.cpp ; run mp_at.cpp ; -# run mp_at_2.cpp ; +run mp_at_2.cpp ; # run mp_at_sf.cpp : : : gcc-4.7:all ; run mp_take.cpp ; -# run mp_take_2.cpp ; +run mp_take_2.cpp ; run mp_slice.cpp ; -# run mp_slice_2.cpp ; +run mp_slice_2.cpp ; run mp_replace.cpp ; run mp_replace_if.cpp ; run mp_replace_if_q.cpp ; @@ -144,27 +144,27 @@ run mp_replace_at.cpp ; run mp_replace_at_c.cpp ; run mp_for_each.cpp ; run mp_insert.cpp ; -# run mp_insert_2.cpp ; +run mp_insert_2.cpp ; run mp_erase.cpp ; -# run mp_erase_2.cpp ; +run mp_erase_2.cpp ; run mp_with_index.cpp ; run mp_with_index_cx.cpp ; run mp_from_sequence.cpp ; -# run mp_from_sequence_2.cpp ; +run mp_from_sequence_2.cpp ; run mp_min_element.cpp ; -# run mp_min_element_2.cpp ; +run mp_min_element_2.cpp ; run mp_min_element_q.cpp ; -# run mp_min_element_q_2.cpp ; +run mp_min_element_q_2.cpp ; run mp_max_element.cpp ; -# run mp_max_element_2.cpp ; +run mp_max_element_2.cpp ; run mp_max_element_q.cpp ; -# run mp_max_element_q_2.cpp ; +run mp_max_element_q_2.cpp ; run mp_nth_element.cpp ; run mp_nth_element_q.cpp ; run mp_back.cpp ; -# run mp_back_2.cpp ; +run mp_back_2.cpp ; run mp_pop_back.cpp ; -# run mp_pop_back_2.cpp ; +run mp_pop_back_2.cpp ; run mp_flatten.cpp ; run mp_rotate_left.cpp ; run mp_rotate_right.cpp ; diff --git a/test/mp_at_2.cpp b/test/mp_at_2.cpp index c111d3a6..3d237d0f 100644 --- a/test/mp_at_2.cpp +++ b/test/mp_at_2.cpp @@ -2,8 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -12,7 +11,18 @@ int main() {} #else + +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_back_2.cpp b/test/mp_back_2.cpp index 1d05c94d..3a6602f2 100644 --- a/test/mp_back_2.cpp +++ b/test/mp_back_2.cpp @@ -2,10 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -14,7 +12,19 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_drop_2.cpp b/test/mp_drop_2.cpp index d9c58dc9..97fab870 100644 --- a/test/mp_drop_2.cpp +++ b/test/mp_drop_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_erase_2.cpp b/test/mp_erase_2.cpp index 0bcf54de..1d97883f 100644 --- a/test/mp_erase_2.cpp +++ b/test/mp_erase_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_fill_2.cpp b/test/mp_fill_2.cpp index bd81d3b2..8409a1dd 100644 --- a/test/mp_fill_2.cpp +++ b/test/mp_fill_2.cpp @@ -2,8 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -12,7 +11,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_from_sequence_2.cpp b/test/mp_from_sequence_2.cpp index 5e3538a6..d2dac811 100644 --- a/test/mp_from_sequence_2.cpp +++ b/test/mp_from_sequence_2.cpp @@ -2,11 +2,19 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct S; diff --git a/test/mp_insert_2.cpp b/test/mp_insert_2.cpp index 2b15fe77..3c03b571 100644 --- a/test/mp_insert_2.cpp +++ b/test/mp_insert_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_iota_2.cpp b/test/mp_iota_2.cpp index f1a0f07a..002c718e 100644 --- a/test/mp_iota_2.cpp +++ b/test/mp_iota_2.cpp @@ -2,10 +2,18 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_max_element_2.cpp b/test/mp_max_element_2.cpp index 966a698f..35f08adb 100644 --- a/test/mp_max_element_2.cpp +++ b/test/mp_max_element_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_max_element_q_2.cpp b/test/mp_max_element_q_2.cpp index 4956d8a8..7eb74509 100644 --- a/test/mp_max_element_q_2.cpp +++ b/test/mp_max_element_q_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_min_element_2.cpp b/test/mp_min_element_2.cpp index 80899640..694f3b79 100644 --- a/test/mp_min_element_2.cpp +++ b/test/mp_min_element_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_min_element_q_2.cpp b/test/mp_min_element_q_2.cpp index c1bb9204..1f9a7c09 100644 --- a/test/mp_min_element_q_2.cpp +++ b/test/mp_min_element_q_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_pop_back_2.cpp b/test/mp_pop_back_2.cpp index 1061a38a..52d5651e 100644 --- a/test/mp_pop_back_2.cpp +++ b/test/mp_pop_back_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_repeat_2.cpp b/test/mp_repeat_2.cpp index d9c92bd9..81649d3c 100644 --- a/test/mp_repeat_2.cpp +++ b/test/mp_repeat_2.cpp @@ -2,9 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_repeat_3.cpp b/test/mp_repeat_3.cpp index 12f2c974..69977254 100644 --- a/test/mp_repeat_3.cpp +++ b/test/mp_repeat_3.cpp @@ -8,11 +8,19 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_slice_2.cpp b/test/mp_slice_2.cpp index 1ac2d730..25e378ef 100644 --- a/test/mp_slice_2.cpp +++ b/test/mp_slice_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_take_2.cpp b/test/mp_take_2.cpp index 56adc5b9..bdaec88e 100644 --- a/test/mp_take_2.cpp +++ b/test/mp_take_2.cpp @@ -2,9 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,7 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include #include +#endif + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_transform_2.cpp b/test/mp_transform_2.cpp index dc6f305f..d0b2685d 100644 --- a/test/mp_transform_2.cpp +++ b/test/mp_transform_2.cpp @@ -2,9 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include -#include -#include +#include + #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -13,6 +12,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include +#include +#include +#endif + + template struct V1 {}; template struct V2 {}; diff --git a/test/mp_transform_q_2.cpp b/test/mp_transform_q_2.cpp index bacf24d9..51177145 100644 --- a/test/mp_transform_q_2.cpp +++ b/test/mp_transform_q_2.cpp @@ -2,12 +2,21 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + +#include struct X1 {}; struct X2 {}; From 8354e2c8b393865aa696406264ffc2b6272aa0c1 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:34:32 +0100 Subject: [PATCH 18/86] Non-cmake algorithm test --- test/Jamfile | 2 +- test/mp_at_sf.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/Jamfile b/test/Jamfile index b1c27994..f7d955a9 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -105,7 +105,7 @@ run mp_iota.cpp ; run mp_iota_2.cpp ; run mp_at.cpp ; run mp_at_2.cpp ; -# run mp_at_sf.cpp : : : gcc-4.7:all ; +run mp_at_sf.cpp : : : gcc-4.7:all ; run mp_take.cpp ; run mp_take_2.cpp ; run mp_slice.cpp ; diff --git a/test/mp_at_sf.cpp b/test/mp_at_sf.cpp index 00463f9f..66527b43 100644 --- a/test/mp_at_sf.cpp +++ b/test/mp_at_sf.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + using boost::mp11::mp_valid; using boost::mp11::mp_at; From 40165f8f24f375d78f9c99068f73b1078a1fa64f Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:36:08 +0100 Subject: [PATCH 19/86] tests: integral --- test/Jamfile | 6 +++--- test/integral.cpp | 8 ++++++++ test/mp_value.cpp | 11 ++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index f7d955a9..b33eaa51 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -179,9 +179,9 @@ run mp_intersperse.cpp ; run mp_split.cpp ; run mp_join.cpp ; -# # integral -# run integral.cpp ; -# run mp_value.cpp ; +# integral +run integral.cpp ; +run mp_value.cpp ; # # utility # run mp_identity.cpp ; diff --git a/test/integral.cpp b/test/integral.cpp index ce0f9610..0badf9ac 100644 --- a/test/integral.cpp +++ b/test/integral.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_value.cpp b/test/mp_value.cpp index a81854d2..6b5b2282 100644 --- a/test/mp_value.cpp +++ b/test/mp_value.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) @@ -11,9 +11,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + int main() { From a7f9b000416e98fc7b369223b42dfddcfff4107f Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:38:22 +0100 Subject: [PATCH 20/86] Tests: compile --- test/Jamfile | 6 +++--- test/complex_h.cpp | 2 ++ test/mp11.cpp | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index b33eaa51..2b09cefd 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -27,9 +27,9 @@ project clang:on ; -# # include-only -# compile mp11.cpp ; -# compile complex_h.cpp ; +# include-only +compile mp11.cpp ; +compile complex_h.cpp ; # list run mp_size.cpp ; diff --git a/test/complex_h.cpp b/test/complex_h.cpp index 63d26759..02d35e19 100644 --- a/test/complex_h.cpp +++ b/test/complex_h.cpp @@ -4,8 +4,10 @@ #define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING +#ifndef BOOST_USE_MODULES #include #include +#endif int main() { diff --git a/test/mp11.cpp b/test/mp11.cpp index 6ab26cb7..0361a56e 100644 --- a/test/mp11.cpp +++ b/test/mp11.cpp @@ -7,7 +7,11 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import boost.mp11; +#else #include +#endif int main() { From ed0935fa77a665300a09b6413e4aa6bd21062a38 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 17:45:17 +0100 Subject: [PATCH 21/86] Utility tests --- test/Jamfile | 42 +++++++++++++++++++------------------- test/mp_compose.cpp | 10 +++++++++ test/mp_compose_sf.cpp | 7 +++++++ test/mp_cond.cpp | 8 ++++++++ test/mp_cond_sf.cpp | 8 ++++++++ test/mp_defer.cpp | 9 ++++++++ test/mp_eval_if.cpp | 8 ++++++++ test/mp_eval_if_not.cpp | 8 ++++++++ test/mp_eval_if_sf.cpp | 8 ++++++++ test/mp_eval_or.cpp | 8 ++++++++ test/mp_identity.cpp | 8 ++++++++ test/mp_if.cpp | 8 ++++++++ test/mp_if_sf.cpp | 8 ++++++++ test/mp_inherit.cpp | 8 ++++++++ test/mp_invoke_q.cpp | 8 ++++++++ test/mp_invoke_q_sf.cpp | 10 ++++++++- test/mp_not_fn.cpp | 8 ++++++++ test/mp_quote.cpp | 10 ++++++++- test/mp_quote_trait.cpp | 10 ++++++++- test/mp_valid.cpp | 10 ++++++++- test/mp_valid_and_true.cpp | 8 ++++++++ 21 files changed, 187 insertions(+), 25 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 2b09cefd..2b81ff85 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -183,27 +183,27 @@ run mp_join.cpp ; run integral.cpp ; run mp_value.cpp ; -# # utility -# run mp_identity.cpp ; -# run mp_inherit.cpp ; -# run mp_if.cpp ; -# run mp_if_sf.cpp ; -# run mp_eval_if.cpp ; -# run mp_eval_if_sf.cpp ; -# run mp_valid.cpp ; -# run mp_defer.cpp ; -# run mp_quote.cpp ; -# run mp_invoke_q.cpp ; -# run mp_invoke_q_sf.cpp ; -# run mp_quote_trait.cpp ; -# run mp_cond.cpp ; -# run mp_cond_sf.cpp ; -# run mp_not_fn.cpp ; -# run mp_eval_if_not.cpp ; -# run mp_eval_or.cpp ; -# run mp_compose.cpp ; -# run mp_valid_and_true.cpp ; -# compile mp_compose_sf.cpp ; +# utility +run mp_identity.cpp ; +run mp_inherit.cpp ; +run mp_if.cpp ; +run mp_if_sf.cpp ; +run mp_eval_if.cpp ; +run mp_eval_if_sf.cpp ; +run mp_valid.cpp ; +run mp_defer.cpp ; +run mp_quote.cpp ; +run mp_invoke_q.cpp ; +run mp_invoke_q_sf.cpp ; +run mp_quote_trait.cpp ; +run mp_cond.cpp ; +run mp_cond_sf.cpp ; +run mp_not_fn.cpp ; +run mp_eval_if_not.cpp ; +run mp_eval_or.cpp ; +run mp_compose.cpp ; +run mp_valid_and_true.cpp ; +compile mp_compose_sf.cpp ; # # integer_sequence # run integer_sequence.cpp ; diff --git a/test/mp_compose.cpp b/test/mp_compose.cpp index b8259e8a..5f99d675 100644 --- a/test/mp_compose.cpp +++ b/test/mp_compose.cpp @@ -3,8 +3,18 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include +#endif + +#include + template struct F1 {}; template struct F2 {}; diff --git a/test/mp_compose_sf.cpp b/test/mp_compose_sf.cpp index 0db06645..05821402 100644 --- a/test/mp_compose_sf.cpp +++ b/test/mp_compose_sf.cpp @@ -2,7 +2,14 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import boost.mp11; +#else #include +#endif + +#include + using namespace boost::mp11; // A simple metafunction that takes the first three items from a list diff --git a/test/mp_cond.cpp b/test/mp_cond.cpp index 08a625fa..6d7a63cc 100644 --- a/test/mp_cond.cpp +++ b/test/mp_cond.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_cond_sf.cpp b/test/mp_cond_sf.cpp index c1bb4de5..867ede18 100644 --- a/test/mp_cond_sf.cpp +++ b/test/mp_cond_sf.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_defer.cpp b/test/mp_defer.cpp index e09973ee..22357fae 100644 --- a/test/mp_defer.cpp +++ b/test/mp_defer.cpp @@ -7,11 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + +#include using boost::mp11::mp_identity; using boost::mp11::mp_true; diff --git a/test/mp_eval_if.cpp b/test/mp_eval_if.cpp index 7e44c675..cd23933e 100644 --- a/test/mp_eval_if.cpp +++ b/test/mp_eval_if.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_eval_if_not.cpp b/test/mp_eval_if_not.cpp index 987e0373..8226d3c9 100644 --- a/test/mp_eval_if_not.cpp +++ b/test/mp_eval_if_not.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_eval_if_sf.cpp b/test/mp_eval_if_sf.cpp index aed1191d..c83c0089 100644 --- a/test/mp_eval_if_sf.cpp +++ b/test/mp_eval_if_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + using boost::mp11::mp_eval_if; using boost::mp11::mp_eval_if_q; diff --git a/test/mp_eval_or.cpp b/test/mp_eval_or.cpp index c56a91b4..2c026dc3 100644 --- a/test/mp_eval_or.cpp +++ b/test/mp_eval_or.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + template using difference_type = typename T::difference_type; diff --git a/test/mp_identity.cpp b/test/mp_identity.cpp index 3198718b..73011e1d 100644 --- a/test/mp_identity.cpp +++ b/test/mp_identity.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + struct X {}; diff --git a/test/mp_if.cpp b/test/mp_if.cpp index 1a5bca9b..aff56a0d 100644 --- a/test/mp_if.cpp +++ b/test/mp_if.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_if_sf.cpp b/test/mp_if_sf.cpp index 15ef3091..39afa8ae 100644 --- a/test/mp_if_sf.cpp +++ b/test/mp_if_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { diff --git a/test/mp_inherit.cpp b/test/mp_inherit.cpp index dfd5fc46..3a3525be 100644 --- a/test/mp_inherit.cpp +++ b/test/mp_inherit.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_invoke_q.cpp b/test/mp_invoke_q.cpp index 777f44bb..3e7aae16 100644 --- a/test/mp_invoke_q.cpp +++ b/test/mp_invoke_q.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + using boost::mp11::mp_invoke_q; using boost::mp11::mp_size_t; diff --git a/test/mp_invoke_q_sf.cpp b/test/mp_invoke_q_sf.cpp index 26e2912b..c77a678a 100644 --- a/test/mp_invoke_q_sf.cpp +++ b/test/mp_invoke_q_sf.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include -#include #include #include +#endif + +#include using boost::mp11::mp_invoke_q; using boost::mp11::mp_quote; diff --git a/test/mp_not_fn.cpp b/test/mp_not_fn.cpp index 808e0ab1..f14448f6 100644 --- a/test/mp_not_fn.cpp +++ b/test/mp_not_fn.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + template using is_const_ = std::is_const; diff --git a/test/mp_quote.cpp b/test/mp_quote.cpp index 62bc915b..0420a39b 100644 --- a/test/mp_quote.cpp +++ b/test/mp_quote.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include -#include #include #include +#endif + +#include using boost::mp11::mp_invoke_q; diff --git a/test/mp_quote_trait.cpp b/test/mp_quote_trait.cpp index ab52bb94..09d16c64 100644 --- a/test/mp_quote_trait.cpp +++ b/test/mp_quote_trait.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include -#include #include #include +#endif + +#include int main() { diff --git a/test/mp_valid.cpp b/test/mp_valid.cpp index 9a95b944..4fb94763 100644 --- a/test/mp_valid.cpp +++ b/test/mp_valid.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include -#include #include +#endif + +#include template struct Xi { diff --git a/test/mp_valid_and_true.cpp b/test/mp_valid_and_true.cpp index 31cf8fd6..49e65fe0 100644 --- a/test/mp_valid_and_true.cpp +++ b/test/mp_valid_and_true.cpp @@ -6,9 +6,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + template using has_size_t_difference_type From 23871f851271ef83a55c9f6087b3d7c8cdb89b9a Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 18:01:20 +0100 Subject: [PATCH 22/86] Integer sequence tests --- test/Jamfile | 6 +++--- test/integer_sequence.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 2b81ff85..ce69c7a3 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -205,10 +205,10 @@ run mp_compose.cpp ; run mp_valid_and_true.cpp ; compile mp_compose_sf.cpp ; -# # integer_sequence -# run integer_sequence.cpp ; +# integer_sequence +run integer_sequence.cpp ; -# # tuple +# tuple # run tuple_for_each.cpp ; # compile tuple_for_each_cx.cpp ; # run tuple_apply.cpp ; diff --git a/test/integer_sequence.cpp b/test/integer_sequence.cpp index bc489ab6..dfa798a2 100644 --- a/test/integer_sequence.cpp +++ b/test/integer_sequence.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { From e4294bc2295049fec32b561b4208fa1382158e95 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 18:36:26 +0100 Subject: [PATCH 23/86] Missing exports in tuple --- include/boost/mp11/tuple.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index c37883f6..d55a665f 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -44,6 +44,7 @@ template BOOST_MP11_CONSTEXPR auto tuple_ap } // namespace detail +BOOST_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_apply( F && f, Tp && tp ) @@ -63,6 +64,7 @@ template BOOST_MP11_CONSTEXPR T construct_f } // namespace detail +BOOST_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR T construct_from_tuple( Tp && tp ) @@ -87,6 +89,7 @@ template BOOST_MP11_CONSTEXPR F tuple_for_each_impl( Tp && /* } // namespace detail +BOOST_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F tuple_for_each( Tp && tp, F && f ) { using seq = make_index_sequence::type>::value>; @@ -154,6 +157,7 @@ BOOST_MP11_CONSTEXPR auto tuple_transform_impl( integer_sequence::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) @@ -164,6 +168,7 @@ BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) #else +BOOST_MODULE_EXPORT template::type>::value>...>, class E = mp_if, mp_front>, From 13c3bce0a39dd7ffbeaa7012b6d21c6f97af6560 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 18:37:13 +0100 Subject: [PATCH 24/86] Tests: tuple --- test/Jamfile | 18 +++++++++--------- test/construct_from_tuple.cpp | 10 +++++++++- test/construct_from_tuple_cx.cpp | 11 ++++++++++- test/tuple_apply.cpp | 8 ++++++++ test/tuple_apply_cx.cpp | 11 ++++++++++- test/tuple_for_each.cpp | 8 ++++++++ test/tuple_for_each_cx.cpp | 11 ++++++++++- test/tuple_transform.cpp | 9 +++++++++ test/tuple_transform_2.cpp | 9 +++++++++ test/tuple_transform_cx.cpp | 11 ++++++++++- 10 files changed, 92 insertions(+), 14 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index ce69c7a3..ad4586f5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -209,15 +209,15 @@ compile mp_compose_sf.cpp ; run integer_sequence.cpp ; # tuple -# run tuple_for_each.cpp ; -# compile tuple_for_each_cx.cpp ; -# run tuple_apply.cpp ; -# compile tuple_apply_cx.cpp ; -# run construct_from_tuple.cpp ; -# compile construct_from_tuple_cx.cpp ; -# run tuple_transform.cpp ; -# run tuple_transform_2.cpp ; -# compile tuple_transform_cx.cpp ; +run tuple_for_each.cpp ; +compile tuple_for_each_cx.cpp ; +run tuple_apply.cpp ; +compile tuple_apply_cx.cpp ; +run construct_from_tuple.cpp ; +compile construct_from_tuple_cx.cpp ; +run tuple_transform.cpp ; +run tuple_transform_2.cpp ; +compile tuple_transform_cx.cpp ; # # set # run mp_set_contains.cpp ; diff --git a/test/construct_from_tuple.cpp b/test/construct_from_tuple.cpp index b4b7f34d..1a5f0b09 100644 --- a/test/construct_from_tuple.cpp +++ b/test/construct_from_tuple.cpp @@ -11,13 +11,21 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include -#include #include #include #include #include #include +#endif + +#include struct T1 { diff --git a/test/construct_from_tuple_cx.cpp b/test/construct_from_tuple_cx.cpp index 8962d3ed..4284098f 100644 --- a/test/construct_from_tuple_cx.cpp +++ b/test/construct_from_tuple_cx.cpp @@ -11,7 +11,7 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif -#include +#include // For __GLIBCXX__ #include // Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++ @@ -22,9 +22,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + struct T1 { diff --git a/test/tuple_apply.cpp b/test/tuple_apply.cpp index dc509592..535147cc 100644 --- a/test/tuple_apply.cpp +++ b/test/tuple_apply.cpp @@ -11,12 +11,20 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/tuple_apply_cx.cpp b/test/tuple_apply_cx.cpp index bcd26779..7160fc65 100644 --- a/test/tuple_apply_cx.cpp +++ b/test/tuple_apply_cx.cpp @@ -11,7 +11,7 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif -#include +#include // for __GLIBCXX__ #include // Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++ @@ -22,9 +22,18 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include #include +#endif + constexpr int f( int x, int y, int z ) { diff --git a/test/tuple_for_each.cpp b/test/tuple_for_each.cpp index a7e9428b..8944f869 100644 --- a/test/tuple_for_each.cpp +++ b/test/tuple_for_each.cpp @@ -11,12 +11,20 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/tuple_for_each_cx.cpp b/test/tuple_for_each_cx.cpp index 7316f30b..13441585 100644 --- a/test/tuple_for_each_cx.cpp +++ b/test/tuple_for_each_cx.cpp @@ -11,7 +11,7 @@ #pragma warning( disable: 4244 ) // 'initializing': conversion from 'int' to 'char', possible loss of data #endif -#include +#include // For __GLIBCXX__ #include // Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++ @@ -22,8 +22,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + struct assert_is_integral { diff --git a/test/tuple_transform.cpp b/test/tuple_transform.cpp index 22ed0ea0..45041ff3 100644 --- a/test/tuple_transform.cpp +++ b/test/tuple_transform.cpp @@ -6,12 +6,21 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#include +#else #include #include #include #include #include #include +#endif + // family of test types with state template diff --git a/test/tuple_transform_2.cpp b/test/tuple_transform_2.cpp index 0c556ef7..5bbb1989 100644 --- a/test/tuple_transform_2.cpp +++ b/test/tuple_transform_2.cpp @@ -2,6 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -9,6 +15,9 @@ #include #include #include +#endif + +#include int f( int x ) { diff --git a/test/tuple_transform_cx.cpp b/test/tuple_transform_cx.cpp index f5e7dbdb..edcc1fc0 100644 --- a/test/tuple_transform_cx.cpp +++ b/test/tuple_transform_cx.cpp @@ -4,7 +4,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include +#include // For __GLIBCXX__ #include // Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++ @@ -15,8 +15,17 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else +#include #include #include +#endif + constexpr int f( int x ) { From 9f7574d9c41463bace965b9a9a3d4e1de1d5ff18 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 20:25:51 +0100 Subject: [PATCH 25/86] Set modularization and tests --- include/boost/mp11/set.hpp | 14 +++++++------- test/Jamfile | 22 +++++++++++----------- test/mp_is_set.cpp | 8 ++++++++ test/mp_set_contains.cpp | 8 ++++++++ test/mp_set_difference.cpp | 8 ++++++++ test/mp_set_difference_sf.cpp | 8 ++++++++ test/mp_set_intersection.cpp | 8 ++++++++ test/mp_set_intersection_sf.cpp | 8 ++++++++ test/mp_set_push_back.cpp | 8 ++++++++ test/mp_set_push_front.cpp | 8 ++++++++ test/mp_set_union.cpp | 8 ++++++++ test/mp_set_union_sf.cpp | 8 ++++++++ 12 files changed, 98 insertions(+), 18 deletions(-) diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index 1f4b84fc..e40dfa97 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -42,7 +42,7 @@ template class L, class... T, class V> struct mp_set_contains } // namespace detail -template using mp_set_contains = typename detail::mp_set_contains_impl::type; +BOOST_MODULE_EXPORT template using mp_set_contains = typename detail::mp_set_contains_impl::type; // mp_set_push_back namespace detail @@ -65,7 +65,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; +BOOST_MODULE_EXPORT template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; // mp_set_push_front namespace detail @@ -93,7 +93,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; +BOOST_MODULE_EXPORT template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; // mp_is_set namespace detail @@ -141,7 +141,7 @@ template class L, class... T> struct mp_is_set_impl> } // namespace detail -template using mp_is_set = typename detail::mp_is_set_impl::type; +BOOST_MODULE_EXPORT template using mp_is_set = typename detail::mp_is_set_impl::type; // mp_set_union namespace detail @@ -174,7 +174,7 @@ template struct mp_set_union_impl using mp_set_union = typename detail::mp_set_union_impl::type; +BOOST_MODULE_EXPORT template using mp_set_union = typename detail::mp_set_union_impl::type; // mp_set_intersection namespace detail @@ -202,7 +202,7 @@ template struct mp_set_intersection_impl: mp_defer } // namespace detail -template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; +BOOST_MODULE_EXPORT template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; // mp_set_difference namespace detail @@ -215,7 +215,7 @@ template struct in_any_set } // namespace detail -template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; +BOOST_MODULE_EXPORT template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; } // namespace mp11 } // namespace boost diff --git a/test/Jamfile b/test/Jamfile index ad4586f5..3ec1de9c 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -219,17 +219,17 @@ run tuple_transform.cpp ; run tuple_transform_2.cpp ; compile tuple_transform_cx.cpp ; -# # set -# run mp_set_contains.cpp ; -# run mp_set_push_back.cpp ; -# run mp_set_push_front.cpp ; -# run mp_is_set.cpp ; -# run mp_set_union.cpp ; -# run mp_set_union_sf.cpp ; -# run mp_set_difference.cpp ; -# run mp_set_difference_sf.cpp ; -# run mp_set_intersection.cpp ; -# run mp_set_intersection_sf.cpp ; +# set +run mp_set_contains.cpp ; +run mp_set_push_back.cpp ; +run mp_set_push_front.cpp ; +run mp_is_set.cpp ; +run mp_set_union.cpp ; +run mp_set_union_sf.cpp ; +run mp_set_difference.cpp ; +run mp_set_difference_sf.cpp ; +run mp_set_intersection.cpp ; +run mp_set_intersection_sf.cpp ; # # function # run mp_all.cpp ; diff --git a/test/mp_is_set.cpp b/test/mp_is_set.cpp index 8657dc45..18b5d9f6 100644 --- a/test/mp_is_set.cpp +++ b/test/mp_is_set.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_set_contains.cpp b/test/mp_set_contains.cpp index d5331461..dd512471 100644 --- a/test/mp_set_contains.cpp +++ b/test/mp_set_contains.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_difference.cpp b/test/mp_set_difference.cpp index 9e21f400..735ac9ba 100644 --- a/test/mp_set_difference.cpp +++ b/test/mp_set_difference.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_difference_sf.cpp b/test/mp_set_difference_sf.cpp index ddcb63d0..45257026 100644 --- a/test/mp_set_difference_sf.cpp +++ b/test/mp_set_difference_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { diff --git a/test/mp_set_intersection.cpp b/test/mp_set_intersection.cpp index d9e16dde..41dc682d 100644 --- a/test/mp_set_intersection.cpp +++ b/test/mp_set_intersection.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_intersection_sf.cpp b/test/mp_set_intersection_sf.cpp index 21af2ef5..185aa724 100644 --- a/test/mp_set_intersection_sf.cpp +++ b/test/mp_set_intersection_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { diff --git a/test/mp_set_push_back.cpp b/test/mp_set_push_back.cpp index 279140e0..fec547af 100644 --- a/test/mp_set_push_back.cpp +++ b/test/mp_set_push_back.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_push_front.cpp b/test/mp_set_push_front.cpp index a027ac32..e8bc0b78 100644 --- a/test/mp_set_push_front.cpp +++ b/test/mp_set_push_front.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_union.cpp b/test/mp_set_union.cpp index 0811d293..cc21caf2 100644 --- a/test/mp_set_union.cpp +++ b/test/mp_set_union.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_set_union_sf.cpp b/test/mp_set_union_sf.cpp index badf7933..31625041 100644 --- a/test/mp_set_union_sf.cpp +++ b/test/mp_set_union_sf.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + int main() { From 36f58d01865a27ae4d1a55b5f68e6f03dcfb677d Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 20:32:39 +0100 Subject: [PATCH 26/86] Tests: function --- include/boost/mp11/function.hpp | 2 +- test/Jamfile | 26 +++++++++++++------------- test/mp_all.cpp | 10 +++++++++- test/mp_all_2.cpp | 8 ++++++++ test/mp_and.cpp | 8 ++++++++ test/mp_any.cpp | 10 +++++++++- test/mp_any_2.cpp | 8 ++++++++ test/mp_less.cpp | 8 ++++++++ test/mp_max.cpp | 8 ++++++++ test/mp_min.cpp | 8 ++++++++ test/mp_or.cpp | 8 ++++++++ test/mp_plus.cpp | 8 ++++++++ test/mp_same.cpp | 7 +++++++ test/mp_similar.cpp | 8 ++++++++ 14 files changed, 111 insertions(+), 16 deletions(-) diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 282418a7..324aaf3a 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -78,7 +78,7 @@ template struct mp_and_impl< mp_list, mp_void.. } // namespace detail -template using mp_and = typename detail::mp_and_impl>::type; +BOOST_MODULE_EXPORT template using mp_and = typename detail::mp_and_impl>::type; #endif diff --git a/test/Jamfile b/test/Jamfile index 3ec1de9c..b7c1d6f5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -231,19 +231,19 @@ run mp_set_difference_sf.cpp ; run mp_set_intersection.cpp ; run mp_set_intersection_sf.cpp ; -# # function -# run mp_all.cpp ; -# run mp_all_2.cpp ; -# run mp_and.cpp ; -# run mp_any.cpp ; -# run mp_any_2.cpp ; -# run mp_or.cpp ; -# run mp_same.cpp ; -# run mp_plus.cpp ; -# run mp_less.cpp ; -# run mp_min.cpp ; -# run mp_max.cpp ; -# run mp_similar.cpp ; +# function +run mp_all.cpp ; +run mp_all_2.cpp ; +run mp_and.cpp ; +run mp_any.cpp ; +run mp_any_2.cpp ; +run mp_or.cpp ; +run mp_same.cpp ; +run mp_plus.cpp ; +run mp_less.cpp ; +run mp_min.cpp ; +run mp_max.cpp ; +run mp_similar.cpp ; # # map # run mp_map_find.cpp ; diff --git a/test/mp_all.cpp b/test/mp_all.cpp index 64f1e8f6..820632e0 100644 --- a/test/mp_all.cpp +++ b/test/mp_all.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include -#include #include #include +#endif + +#include using boost::mp11::mp_all; diff --git a/test/mp_all_2.cpp b/test/mp_all_2.cpp index b656c3dc..56b0c9fc 100644 --- a/test/mp_all_2.cpp +++ b/test/mp_all_2.cpp @@ -8,11 +8,19 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_and.cpp b/test/mp_and.cpp index 93da74a2..f11e3690 100644 --- a/test/mp_and.cpp +++ b/test/mp_and.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_any.cpp b/test/mp_any.cpp index 9376050e..be35e192 100644 --- a/test/mp_any.cpp +++ b/test/mp_any.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include -#include #include #include +#endif + +#include using boost::mp11::mp_any; using boost::mp11::mp_all; diff --git a/test/mp_any_2.cpp b/test/mp_any_2.cpp index 91f23d9f..9d9c7657 100644 --- a/test/mp_any_2.cpp +++ b/test/mp_any_2.cpp @@ -8,11 +8,19 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_less.cpp b/test/mp_less.cpp index 0e72faf8..d2016359 100644 --- a/test/mp_less.cpp +++ b/test/mp_less.cpp @@ -12,10 +12,18 @@ # pragma GCC diagnostic ignored "-Wsign-compare" #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_max.cpp b/test/mp_max.cpp index 577d26bc..6671bc36 100644 --- a/test/mp_max.cpp +++ b/test/mp_max.cpp @@ -12,10 +12,18 @@ # pragma GCC diagnostic ignored "-Wsign-compare" #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_min.cpp b/test/mp_min.cpp index a2320984..f4ebcd18 100644 --- a/test/mp_min.cpp +++ b/test/mp_min.cpp @@ -12,10 +12,18 @@ # pragma GCC diagnostic ignored "-Wsign-compare" #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_or.cpp b/test/mp_or.cpp index f88097eb..039037f4 100644 --- a/test/mp_or.cpp +++ b/test/mp_or.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + int main() { diff --git a/test/mp_plus.cpp b/test/mp_plus.cpp index 06c05d2c..7baf5bd7 100644 --- a/test/mp_plus.cpp +++ b/test/mp_plus.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + template using integral = std::integral_constant; diff --git a/test/mp_same.cpp b/test/mp_same.cpp index 912b54e0..871338c1 100644 --- a/test/mp_same.cpp +++ b/test/mp_same.cpp @@ -12,11 +12,18 @@ # pragma warning( disable: 4503 ) // decorated name length exceeded #endif +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif int main() { diff --git a/test/mp_similar.cpp b/test/mp_similar.cpp index 140c4eda..0e48c07f 100644 --- a/test/mp_similar.cpp +++ b/test/mp_similar.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + template class X; template class Y; From f4c4e6029d6305faae4efe728f371a0bff2a3da3 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 20:43:46 +0100 Subject: [PATCH 27/86] Map tests and modularization --- include/boost/mp11/map.hpp | 16 ++++++++-------- test/Jamfile | 24 ++++++++++++------------ test/mp_is_map.cpp | 8 ++++++++ test/mp_map_contains.cpp | 8 ++++++++ test/mp_map_erase.cpp | 8 ++++++++ test/mp_map_find.cpp | 8 ++++++++ test/mp_map_find_2.cpp | 8 ++++++++ test/mp_map_find_3.cpp | 8 ++++++++ test/mp_map_insert.cpp | 8 ++++++++ test/mp_map_keys.cpp | 8 ++++++++ test/mp_map_replace.cpp | 8 ++++++++ test/mp_map_update.cpp | 8 ++++++++ test/mp_map_update_q.cpp | 8 ++++++++ 13 files changed, 108 insertions(+), 20 deletions(-) diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index a3fe3a4d..0312869b 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -26,10 +26,10 @@ namespace mp11 { // mp_map_contains -template using mp_map_contains = mp_not, void>>; +BOOST_MODULE_EXPORT template using mp_map_contains = mp_not, void>>; // mp_map_insert -template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; +BOOST_MODULE_EXPORT template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; // mp_map_replace namespace detail @@ -50,7 +50,7 @@ template class M, class... U, class T> struct mp_map_replace_ } // namespace detail -template using mp_map_replace = typename detail::mp_map_replace_impl::type; +BOOST_MODULE_EXPORT template using mp_map_replace = typename detail::mp_map_replace_impl::type; // mp_map_update namespace detail @@ -68,8 +68,8 @@ template class F> struct mp_map_update_impl } // namespace detail -template class F> using mp_map_update = typename detail::mp_map_update_impl::type; -template using mp_map_update_q = mp_map_update; +BOOST_MODULE_EXPORT template class F> using mp_map_update = typename detail::mp_map_update_impl::type; +BOOST_MODULE_EXPORT template using mp_map_update_q = mp_map_update; // mp_map_erase namespace detail @@ -83,10 +83,10 @@ template struct mp_map_erase_impl } // namespace detail -template using mp_map_erase = typename detail::mp_map_erase_impl::type; +BOOST_MODULE_EXPORT template using mp_map_erase = typename detail::mp_map_erase_impl::type; // mp_map_keys -template using mp_map_keys = mp_transform; +BOOST_MODULE_EXPORT template using mp_map_keys = mp_transform; // mp_is_map namespace detail @@ -114,7 +114,7 @@ template class M, class... T> struct mp_is_map_impl> } // namespace detail -template using mp_is_map = typename detail::mp_is_map_impl::type; +BOOST_MODULE_EXPORT template using mp_is_map = typename detail::mp_is_map_impl::type; } // namespace mp11 } // namespace boost diff --git a/test/Jamfile b/test/Jamfile index b7c1d6f5..d4054ce6 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -245,18 +245,18 @@ run mp_min.cpp ; run mp_max.cpp ; run mp_similar.cpp ; -# # map -# run mp_map_find.cpp ; -# run mp_map_find_2.cpp ; -# run mp_map_find_3.cpp ; -# run mp_map_contains.cpp ; -# run mp_map_insert.cpp ; -# run mp_map_replace.cpp ; -# run mp_map_erase.cpp ; -# run mp_map_update.cpp ; -# run mp_map_update_q.cpp ; -# run mp_map_keys.cpp ; -# run mp_is_map.cpp ; +# map +run mp_map_find.cpp ; +run mp_map_find_2.cpp ; +run mp_map_find_3.cpp ; +run mp_map_contains.cpp ; +run mp_map_insert.cpp ; +run mp_map_replace.cpp ; +run mp_map_erase.cpp ; +run mp_map_update.cpp ; +run mp_map_update_q.cpp ; +run mp_map_keys.cpp ; +run mp_is_map.cpp ; # # bind # run mp_bind.cpp ; diff --git a/test/mp_is_map.cpp b/test/mp_is_map.cpp index 980d1408..38d5f86b 100644 --- a/test/mp_is_map.cpp +++ b/test/mp_is_map.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_map_contains.cpp b/test/mp_map_contains.cpp index 777b5c8a..4400c333 100644 --- a/test/mp_map_contains.cpp +++ b/test/mp_map_contains.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + int main() { diff --git a/test/mp_map_erase.cpp b/test/mp_map_erase.cpp index db0c691f..35067e61 100644 --- a/test/mp_map_erase.cpp +++ b/test/mp_map_erase.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_map_find.cpp b/test/mp_map_find.cpp index 2bd614da..03ef5a11 100644 --- a/test/mp_map_find.cpp +++ b/test/mp_map_find.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_map_find_2.cpp b/test/mp_map_find_2.cpp index a46af5d5..27d1bc39 100644 --- a/test/mp_map_find_2.cpp +++ b/test/mp_map_find_2.cpp @@ -7,9 +7,17 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + struct X {}; struct Y {}; diff --git a/test/mp_map_find_3.cpp b/test/mp_map_find_3.cpp index cf25c733..f58f5b6f 100644 --- a/test/mp_map_find_3.cpp +++ b/test/mp_map_find_3.cpp @@ -8,9 +8,17 @@ // Same as mp_map_find_2.cpp, but with includes reversed +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include +#endif + struct X {}; struct Y {}; diff --git a/test/mp_map_insert.cpp b/test/mp_map_insert.cpp index 11920a7a..d34edc17 100644 --- a/test/mp_map_insert.cpp +++ b/test/mp_map_insert.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_map_keys.cpp b/test/mp_map_keys.cpp index aa9eb647..98eba177 100644 --- a/test/mp_map_keys.cpp +++ b/test/mp_map_keys.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_map_replace.cpp b/test/mp_map_replace.cpp index c68b0592..ba69f003 100644 --- a/test/mp_map_replace.cpp +++ b/test/mp_map_replace.cpp @@ -7,12 +7,20 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include #include +#endif + int main() { diff --git a/test/mp_map_update.cpp b/test/mp_map_update.cpp index 24e7e775..cffa07eb 100644 --- a/test/mp_map_update.cpp +++ b/test/mp_map_update.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + using boost::mp11::mp_int; diff --git a/test/mp_map_update_q.cpp b/test/mp_map_update_q.cpp index 7aae6ddb..ac9cd7e7 100644 --- a/test/mp_map_update_q.cpp +++ b/test/mp_map_update_q.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + using boost::mp11::mp_int; From 8057e78ca8570f07eaf216b43d5a5771e2f770da Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 20:46:07 +0100 Subject: [PATCH 28/86] Bind tests --- test/mp_bind.cpp | 8 ++++++++ test/mp_bind_back.cpp | 8 ++++++++ test/mp_bind_front.cpp | 8 ++++++++ test/mp_bind_q.cpp | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/test/mp_bind.cpp b/test/mp_bind.cpp index 1174bf48..a79881b5 100644 --- a/test/mp_bind.cpp +++ b/test/mp_bind.cpp @@ -7,6 +7,12 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include @@ -14,6 +20,8 @@ #include #include #include +#endif + struct X1 {}; struct X2 {}; diff --git a/test/mp_bind_back.cpp b/test/mp_bind_back.cpp index f497a13b..842730b5 100644 --- a/test/mp_bind_back.cpp +++ b/test/mp_bind_back.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct L {}; template struct P {}; diff --git a/test/mp_bind_front.cpp b/test/mp_bind_front.cpp index bce077f1..91d976d8 100644 --- a/test/mp_bind_front.cpp +++ b/test/mp_bind_front.cpp @@ -7,11 +7,19 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + template struct L {}; template struct P {}; diff --git a/test/mp_bind_q.cpp b/test/mp_bind_q.cpp index 0fa495cd..ed0eca5e 100644 --- a/test/mp_bind_q.cpp +++ b/test/mp_bind_q.cpp @@ -7,10 +7,18 @@ // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include +#endif + struct X1 {}; struct X2 {}; From 561cf44dd3c1af3b5efb3304aab7d3ae677febd0 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 20:46:20 +0100 Subject: [PATCH 29/86] Lambda tests and modularization --- include/boost/mp11/lambda.hpp | 2 +- test/mp_lambda.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index 7ce61671..e5fb087e 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -40,7 +40,7 @@ template struct lambda_impl; } // namespace detail // mp_lambda -template using mp_lambda = typename detail::lambda_impl::type; +BOOST_MODULE_EXPORT template using mp_lambda = typename detail::lambda_impl::type; namespace detail { diff --git a/test/mp_lambda.cpp b/test/mp_lambda.cpp index 992c7d03..3eca70c0 100644 --- a/test/mp_lambda.cpp +++ b/test/mp_lambda.cpp @@ -16,11 +16,19 @@ int main() {} #else +#ifdef BOOST_USE_MODULES +import std; +import boost.core; +import boost.mp11; +#include +#else #include #include #include #include #include +#endif + struct X; enum E {}; From df2c07929266c2279edec93dfa9d500dff99e887 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 1 Jan 2025 21:11:12 +0100 Subject: [PATCH 30/86] Version tests --- test/Jamfile | 50 +++++++++++++++---------------- test/algorithm_version.cpp | 9 ++++++ test/bind_version.cpp | 9 ++++++ test/function_version.cpp | 9 ++++++ test/integer_sequence_version.cpp | 9 ++++++ test/integral_version.cpp | 9 ++++++ test/list_version.cpp | 9 ++++++ test/map_version.cpp | 9 ++++++ test/mp11_version.cpp | 9 ++++++ test/mp_size_2.cpp | 1 + test/mpl_version.cpp | 9 ++++++ test/set_version.cpp | 9 ++++++ test/tuple_version.cpp | 9 ++++++ test/utility_version.cpp | 9 ++++++ test/version.cpp | 11 +++++-- 15 files changed, 143 insertions(+), 27 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index d4054ce6..e7f018de 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -258,34 +258,34 @@ run mp_map_update_q.cpp ; run mp_map_keys.cpp ; run mp_is_map.cpp ; -# # bind -# run mp_bind.cpp ; -# run mp_bind_q.cpp ; -# run mp_bind_front.cpp ; -# run mp_bind_back.cpp ; +# bind +run mp_bind.cpp ; +run mp_bind_q.cpp ; +run mp_bind_front.cpp ; +run mp_bind_back.cpp ; -# # lambda -# run mp_lambda.cpp ; +# lambda +run mp_lambda.cpp ; -# # mpl -# run mpl.cpp : ; -# run mpl_list.cpp : ; -# run mpl_tuple.cpp : ; +# mpl +run mpl.cpp : ; +run mpl_list.cpp : ; +run mpl_tuple.cpp : ; -# # version -# run version.cpp ; -# run mp11_version.cpp ; -# run list_version.cpp ; -# run algorithm_version.cpp ; -# run integral_version.cpp ; -# run utility_version.cpp ; -# run function_version.cpp ; -# run map_version.cpp ; -# run set_version.cpp ; -# run bind_version.cpp ; -# run integer_sequence_version.cpp ; -# run tuple_version.cpp ; -# run mpl_version.cpp ; +# version +run version.cpp ; +run mp11_version.cpp ; +run list_version.cpp ; +run algorithm_version.cpp ; +run integral_version.cpp ; +run utility_version.cpp ; +run function_version.cpp ; +run map_version.cpp ; +run set_version.cpp ; +run bind_version.cpp ; +run integer_sequence_version.cpp ; +run tuple_version.cpp ; +run mpl_version.cpp ; # quick (for CI) alias quick : mp11 mp_size ; diff --git a/test/algorithm_version.cpp b/test/algorithm_version.cpp index 6960803f..e2b9ce4b 100644 --- a/test/algorithm_version.cpp +++ b/test/algorithm_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/bind_version.cpp b/test/bind_version.cpp index 75f3d957..274080a1 100644 --- a/test/bind_version.cpp +++ b/test/bind_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/function_version.cpp b/test/function_version.cpp index 9464a827..80875d85 100644 --- a/test/function_version.cpp +++ b/test/function_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/integer_sequence_version.cpp b/test/integer_sequence_version.cpp index 2ba3ffe0..92aa9b0c 100644 --- a/test/integer_sequence_version.cpp +++ b/test/integer_sequence_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/integral_version.cpp b/test/integral_version.cpp index 2ba70806..21debc92 100644 --- a/test/integral_version.cpp +++ b/test/integral_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/list_version.cpp b/test/list_version.cpp index 9cee6640..2f207c5b 100644 --- a/test/list_version.cpp +++ b/test/list_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main(){ } + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/map_version.cpp b/test/map_version.cpp index 92925f59..eccf6cbd 100644 --- a/test/map_version.cpp +++ b/test/map_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/mp11_version.cpp b/test/mp11_version.cpp index 17332664..01e8195a 100644 --- a/test/mp11_version.cpp +++ b/test/mp11_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main(){ } + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/mp_size_2.cpp b/test/mp_size_2.cpp index a470cdc5..70ffb2ba 100644 --- a/test/mp_size_2.cpp +++ b/test/mp_size_2.cpp @@ -17,6 +17,7 @@ import boost.core; import boost.mp11; #include #else +#include #include #include #endif diff --git a/test/mpl_version.cpp b/test/mpl_version.cpp index f0d4c1bc..dc0bc7aa 100644 --- a/test/mpl_version.cpp +++ b/test/mpl_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/set_version.cpp b/test/set_version.cpp index 057a251c..087986f1 100644 --- a/test/set_version.cpp +++ b/test/set_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/tuple_version.cpp b/test/tuple_version.cpp index d4d80f59..e77aa0ed 100644 --- a/test/tuple_version.cpp +++ b/test/tuple_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/utility_version.cpp b/test/utility_version.cpp index 64a84eae..8dd520e9 100644 --- a/test/utility_version.cpp +++ b/test/utility_version.cpp @@ -6,6 +6,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES + +// This test doesn't make sense in modular builds +int main() {} + +#else + #include #include #include @@ -15,3 +22,5 @@ int main() BOOST_TEST_EQ( BOOST_MP11_VERSION, BOOST_VERSION ); return boost::report_errors(); } + +#endif // BOOST_USE_MODULES diff --git a/test/version.cpp b/test/version.cpp index 0b8d4a59..126763e6 100644 --- a/test/version.cpp +++ b/test/version.cpp @@ -6,9 +6,16 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include -#include +#ifdef BOOST_USE_MODULES +import boost.core; +#include +#else #include +#endif + +#include +#include + int main() { From c35971e54a315acadfeea3429766a1d7d1617d1c Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 17:19:33 +0100 Subject: [PATCH 31/86] Move away from BOOST_MODULE_EXPORT --- include/boost/mp11/algorithm.hpp | 153 +++++++++--------- include/boost/mp11/bind.hpp | 36 ++--- include/boost/mp11/detail/config.hpp | 8 + include/boost/mp11/detail/modules.hpp | 10 -- include/boost/mp11/detail/mp_append.hpp | 3 +- include/boost/mp11/detail/mp_copy_if.hpp | 5 +- include/boost/mp11/detail/mp_count.hpp | 7 +- include/boost/mp11/detail/mp_defer.hpp | 11 +- include/boost/mp11/detail/mp_fold.hpp | 5 +- include/boost/mp11/detail/mp_front.hpp | 3 +- include/boost/mp11/detail/mp_is_list.hpp | 4 +- .../boost/mp11/detail/mp_is_value_list.hpp | 3 +- include/boost/mp11/detail/mp_list.hpp | 3 +- include/boost/mp11/detail/mp_list_v.hpp | 3 +- include/boost/mp11/detail/mp_map_find.hpp | 3 +- include/boost/mp11/detail/mp_min_element.hpp | 10 +- include/boost/mp11/detail/mp_plus.hpp | 3 +- include/boost/mp11/detail/mp_remove_if.hpp | 5 +- include/boost/mp11/detail/mp_rename.hpp | 7 +- include/boost/mp11/detail/mp_value.hpp | 3 +- include/boost/mp11/detail/mp_void.hpp | 3 +- include/boost/mp11/detail/mp_with_index.hpp | 5 +- include/boost/mp11/function.hpp | 19 ++- include/boost/mp11/integer_sequence.hpp | 14 +- include/boost/mp11/integral.hpp | 15 +- include/boost/mp11/lambda.hpp | 3 +- include/boost/mp11/list.hpp | 51 +++--- include/boost/mp11/map.hpp | 18 +-- include/boost/mp11/set.hpp | 15 +- include/boost/mp11/tuple.hpp | 11 +- include/boost/mp11/utility.hpp | 41 +++-- 31 files changed, 227 insertions(+), 253 deletions(-) delete mode 100644 include/boost/mp11/detail/modules.hpp diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index fd9bd9b9..e9b25cc6 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -23,7 +23,6 @@ #include #include #include -#include #ifndef BOOST_USE_MODULES #include #include @@ -145,13 +144,13 @@ template class F, class... L> using mp_transform = typename d #else -BOOST_MODULE_EXPORT template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; +BOOST_MP11_MODULE_EXPORT template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; #endif #endif -BOOST_MODULE_EXPORT template using mp_transform_q = mp_transform; +BOOST_MP11_MODULE_EXPORT template using mp_transform_q = mp_transform; namespace detail { @@ -198,8 +197,8 @@ template class P, template class F, class... L> str } // namespace detail -BOOST_MODULE_EXPORT template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; -BOOST_MODULE_EXPORT template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; +BOOST_MP11_MODULE_EXPORT template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; // mp_filter namespace detail @@ -219,8 +218,8 @@ template class P, class L1, class... L> struct mp_filter_impl } // namespace detail -BOOST_MODULE_EXPORT template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; -BOOST_MODULE_EXPORT template using mp_filter_q = typename detail::mp_filter_impl::type; +BOOST_MP11_MODULE_EXPORT template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_filter_q = typename detail::mp_filter_impl::type; // mp_fill namespace detail @@ -257,10 +256,10 @@ template class L, auto... A, class V> struct mp_fill_impl using mp_fill = typename detail::mp_fill_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_fill = typename detail::mp_fill_impl::type; // mp_contains -BOOST_MODULE_EXPORT template using mp_contains = mp_to_bool>; +BOOST_MP11_MODULE_EXPORT template using mp_contains = mp_to_bool>; // mp_repeat(_c) namespace detail @@ -286,8 +285,8 @@ template struct mp_repeat_c_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; -BOOST_MODULE_EXPORT template using mp_repeat = typename detail::mp_repeat_c_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_repeat = typename detail::mp_repeat_c_impl::type; // mp_product namespace detail @@ -323,8 +322,8 @@ template class F, class L1, class... L> struct mp_product_imp } // namespace detail -BOOST_MODULE_EXPORT template class F, class... L> using mp_product = typename detail::mp_product_impl::type; -BOOST_MODULE_EXPORT template using mp_product_q = typename detail::mp_product_impl::type; +BOOST_MP11_MODULE_EXPORT template class F, class... L> using mp_product = typename detail::mp_product_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_product_q = typename detail::mp_product_impl::type; // mp_drop(_c) namespace detail @@ -343,9 +342,9 @@ template class L, class... T, template class L2, cl } // namespace detail -BOOST_MODULE_EXPORT template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; +BOOST_MP11_MODULE_EXPORT template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; -BOOST_MODULE_EXPORT template using mp_drop = mp_drop_c; +BOOST_MP11_MODULE_EXPORT template using mp_drop = mp_drop_c; // mp_from_sequence namespace detail @@ -360,11 +359,11 @@ template class S, class U, U... J, class F> struct mp_ } // namespace detail -BOOST_MODULE_EXPORT template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; +BOOST_MP11_MODULE_EXPORT template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; // mp_iota(_c) -BOOST_MODULE_EXPORT template using mp_iota_c = mp_from_sequence, mp_size_t>; -BOOST_MODULE_EXPORT template> using mp_iota = mp_from_sequence::type, N::value>, F>; +BOOST_MP11_MODULE_EXPORT template using mp_iota_c = mp_from_sequence, mp_size_t>; +BOOST_MP11_MODULE_EXPORT template> using mp_iota = mp_from_sequence::type, N::value>, F>; // mp_at(_c) namespace detail @@ -415,11 +414,11 @@ template using mp_at_c = typename detail::mp_at_c_cuda_w #else -BOOST_MODULE_EXPORT template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; +BOOST_MP11_MODULE_EXPORT template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; #endif -BOOST_MODULE_EXPORT template using mp_at = mp_at_c; +BOOST_MP11_MODULE_EXPORT template using mp_at = mp_at_c; // mp_take(_c) namespace detail @@ -497,18 +496,18 @@ struct mp_take_c_impl, typen } // namespace detail -BOOST_MODULE_EXPORT template using mp_take_c = mp_assign>::type>; -BOOST_MODULE_EXPORT template using mp_take = mp_take_c; +BOOST_MP11_MODULE_EXPORT template using mp_take_c = mp_assign>::type>; +BOOST_MP11_MODULE_EXPORT template using mp_take = mp_take_c; // mp_slice(_c) -BOOST_MODULE_EXPORT template using mp_slice_c = mp_drop_c< mp_take_c, I >; -BOOST_MODULE_EXPORT template using mp_slice = mp_drop< mp_take, I >; +BOOST_MP11_MODULE_EXPORT template using mp_slice_c = mp_drop_c< mp_take_c, I >; +BOOST_MP11_MODULE_EXPORT template using mp_slice = mp_drop< mp_take, I >; // mp_back -BOOST_MODULE_EXPORT template using mp_back = mp_at_c::value - 1>; +BOOST_MP11_MODULE_EXPORT template using mp_back = mp_at_c::value - 1>; // mp_pop_back -BOOST_MODULE_EXPORT template using mp_pop_back = mp_take_c::value - 1>; +BOOST_MP11_MODULE_EXPORT template using mp_pop_back = mp_take_c::value - 1>; // mp_replace namespace detail @@ -529,7 +528,7 @@ template class L, class... T, class V, class W> struct mp_rep } // namespace detail -BOOST_MODULE_EXPORT template using mp_replace = typename detail::mp_replace_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_replace = typename detail::mp_replace_impl::type; // mp_replace_if namespace detail @@ -550,8 +549,8 @@ template class L, class... T, template class P, cla } // namespace detail -BOOST_MODULE_EXPORT template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; -BOOST_MODULE_EXPORT template using mp_replace_if_q = mp_replace_if; +BOOST_MP11_MODULE_EXPORT template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_replace_if_q = mp_replace_if; // mp_copy_if // in detail/mp_copy_if.hpp @@ -575,7 +574,7 @@ template class L, class... T, class V> struct mp_remove_impl< } // namespace detail -BOOST_MODULE_EXPORT template using mp_remove = typename detail::mp_remove_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_remove = typename detail::mp_remove_impl::type; // mp_remove_if // in detail/mp_remove_if.hpp @@ -591,7 +590,7 @@ template struct mp_flatten_impl } // namespace detail -BOOST_MODULE_EXPORT template> using mp_flatten = mp_apply, L>, mp_clear>>; +BOOST_MP11_MODULE_EXPORT template> using mp_flatten = mp_apply, L>, mp_clear>>; // mp_partition namespace detail @@ -606,8 +605,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_partition = typename detail::mp_partition_impl::type; -BOOST_MODULE_EXPORT template using mp_partition_q = mp_partition; +BOOST_MP11_MODULE_EXPORT template class P> using mp_partition = typename detail::mp_partition_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_partition_q = mp_partition; // mp_sort namespace detail @@ -651,8 +650,8 @@ template class L, class T1, class... T, template cl } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_sort = typename detail::mp_sort_impl::type; -BOOST_MODULE_EXPORT template using mp_sort_q = mp_sort; +BOOST_MP11_MODULE_EXPORT template class P> using mp_sort = typename detail::mp_sort_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_sort_q = mp_sort; // mp_nth_element(_c) namespace detail @@ -712,9 +711,9 @@ template class L, class T1, class... T, std::size_t I, templa } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; -BOOST_MODULE_EXPORT template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; -BOOST_MODULE_EXPORT template using mp_nth_element_q = mp_nth_element; +BOOST_MP11_MODULE_EXPORT template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; +BOOST_MP11_MODULE_EXPORT template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_nth_element_q = mp_nth_element; // mp_find namespace detail @@ -793,7 +792,7 @@ template class L, class T1, class... T, class V> struct mp_fi } // namespace detail -BOOST_MODULE_EXPORT template using mp_find = typename detail::mp_find_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_find = typename detail::mp_find_impl::type; // mp_find_if namespace detail @@ -848,8 +847,8 @@ template class L, class T1, class... T, template cl } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_find_if = typename detail::mp_find_if_impl::type; -BOOST_MODULE_EXPORT template using mp_find_if_q = mp_find_if; +BOOST_MP11_MODULE_EXPORT template class P> using mp_find_if = typename detail::mp_find_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_find_if_q = mp_find_if; // mp_reverse namespace detail @@ -926,7 +925,7 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -BOOST_MODULE_EXPORT template using mp_reverse = typename detail::mp_reverse_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_reverse = typename detail::mp_reverse_impl::type; // mp_fold // in detail/mp_fold.hpp @@ -968,8 +967,8 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -BOOST_MODULE_EXPORT template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; -BOOST_MODULE_EXPORT template using mp_reverse_fold_q = mp_reverse_fold; +BOOST_MP11_MODULE_EXPORT template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_reverse_fold_q = mp_reverse_fold; // mp_unique namespace detail @@ -984,7 +983,7 @@ template class L, class... T> struct mp_unique_impl> } // namespace detail -BOOST_MODULE_EXPORT template using mp_unique = typename detail::mp_unique_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_unique = typename detail::mp_unique_impl::type; // mp_unique_if namespace detail @@ -1007,23 +1006,23 @@ template class P> struct mp_unique_if_push_back } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class P> using mp_unique_if = mp_fold_q, detail::mp_unique_if_push_back

>; -BOOST_MODULE_EXPORT template using mp_unique_if_q = mp_unique_if; +BOOST_MP11_MODULE_EXPORT template using mp_unique_if_q = mp_unique_if; // mp_all_of -BOOST_MODULE_EXPORT template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; -BOOST_MODULE_EXPORT template using mp_all_of_q = mp_all_of; +BOOST_MP11_MODULE_EXPORT template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; +BOOST_MP11_MODULE_EXPORT template using mp_all_of_q = mp_all_of; // mp_none_of -BOOST_MODULE_EXPORT template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; -BOOST_MODULE_EXPORT template using mp_none_of_q = mp_none_of; +BOOST_MP11_MODULE_EXPORT template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; +BOOST_MP11_MODULE_EXPORT template using mp_none_of_q = mp_none_of; // mp_any_of -BOOST_MODULE_EXPORT template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; -BOOST_MODULE_EXPORT template using mp_any_of_q = mp_any_of; +BOOST_MP11_MODULE_EXPORT template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; +BOOST_MP11_MODULE_EXPORT template using mp_any_of_q = mp_any_of; // mp_replace_at_c namespace detail @@ -1041,8 +1040,8 @@ template struct mp_replace_at_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_replace_at = typename detail::mp_replace_at_impl::type; -BOOST_MODULE_EXPORT template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; +BOOST_MP11_MODULE_EXPORT template using mp_replace_at = typename detail::mp_replace_at_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; //mp_for_each(f) namespace detail @@ -1082,7 +1081,7 @@ template BOOST_MP11_CONSTEXPR mp_if_c::value >= 102 #else -BOOST_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) +BOOST_MP11_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) { return detail::mp_for_each_impl( mp_rename(), std::forward(f) ); } @@ -1090,16 +1089,16 @@ BOOST_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_for_eac #endif // mp_insert -BOOST_MODULE_EXPORT template using mp_insert = mp_append, mp_push_front, T...>>; +BOOST_MP11_MODULE_EXPORT template using mp_insert = mp_append, mp_push_front, T...>>; // mp_insert_c -BOOST_MODULE_EXPORT template using mp_insert_c = mp_append, mp_push_front, T...>>; +BOOST_MP11_MODULE_EXPORT template using mp_insert_c = mp_append, mp_push_front, T...>>; // mp_erase -BOOST_MODULE_EXPORT template using mp_erase = mp_append, mp_drop>; +BOOST_MP11_MODULE_EXPORT template using mp_erase = mp_append, mp_drop>; // mp_erase_c -BOOST_MODULE_EXPORT template using mp_erase_c = mp_append, mp_drop_c>; +BOOST_MP11_MODULE_EXPORT template using mp_erase_c = mp_append, mp_drop_c>; // mp_starts_with // contributed by Glen Joseph Fernandes (glenjofe@gmail.com) @@ -1122,7 +1121,7 @@ struct mp_starts_with_impl, L2 > { } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_starts_with = typename detail::mp_starts_with_impl::type; @@ -1141,12 +1140,12 @@ template> using mp_rotate_imp } // namespace detail -BOOST_MODULE_EXPORT template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; -BOOST_MODULE_EXPORT template using mp_rotate_left = mp_rotate_left_c; +BOOST_MP11_MODULE_EXPORT template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; +BOOST_MP11_MODULE_EXPORT template using mp_rotate_left = mp_rotate_left_c; // mp_rotate_right(_c) -BOOST_MODULE_EXPORT template using mp_rotate_right_c = mp_rotate_left::value, N>>; -BOOST_MODULE_EXPORT template using mp_rotate_right = mp_rotate_right_c; +BOOST_MP11_MODULE_EXPORT template using mp_rotate_right_c = mp_rotate_left::value, N>>; +BOOST_MP11_MODULE_EXPORT template using mp_rotate_right = mp_rotate_right_c; // mp_min_element // mp_max_element @@ -1160,7 +1159,7 @@ template struct mp_power_set_impl; } // namespace detail -BOOST_MODULE_EXPORT template using mp_power_set = typename detail::mp_power_set_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_power_set = typename detail::mp_power_set_impl::type; namespace detail { @@ -1214,8 +1213,8 @@ template class F> struct mp_partial_sum_impl_f } // namespace detail -BOOST_MODULE_EXPORT template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; -BOOST_MODULE_EXPORT template using mp_partial_sum_q = mp_partial_sum; +BOOST_MP11_MODULE_EXPORT template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; +BOOST_MP11_MODULE_EXPORT template using mp_partial_sum_q = mp_partial_sum; // mp_iterate namespace detail @@ -1225,7 +1224,7 @@ template class F, template class R, class } // namespace detail -BOOST_MODULE_EXPORT template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; +BOOST_MP11_MODULE_EXPORT template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; namespace detail { @@ -1243,7 +1242,7 @@ template class F, template class R> struct } // namespace detail -BOOST_MODULE_EXPORT template using mp_iterate_q = mp_iterate; +BOOST_MP11_MODULE_EXPORT template using mp_iterate_q = mp_iterate; // mp_pairwise_fold namespace detail @@ -1253,8 +1252,8 @@ template using mp_pairwise_fold_impl = mp_transform_q using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; -BOOST_MODULE_EXPORT template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; +BOOST_MP11_MODULE_EXPORT template using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; +BOOST_MP11_MODULE_EXPORT template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; // mp_sliding_fold namespace detail @@ -1280,8 +1279,8 @@ template struct mp_sliding_fold_impl using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; -BOOST_MODULE_EXPORT template class F> using mp_sliding_fold = mp_sliding_fold_q>; +BOOST_MP11_MODULE_EXPORT template using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; +BOOST_MP11_MODULE_EXPORT template class F> using mp_sliding_fold = mp_sliding_fold_q>; // mp_intersperse namespace detail @@ -1315,7 +1314,7 @@ template class L, class T1, class... T, class S> struct mp_in } // namespace detail -BOOST_MODULE_EXPORT template using mp_intersperse = typename detail::mp_intersperse_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_intersperse = typename detail::mp_intersperse_impl::type; // mp_split namespace detail @@ -1325,7 +1324,7 @@ template struct mp_split_impl; } // namespace detail -BOOST_MODULE_EXPORT template using mp_split = typename detail::mp_split_impl>::type; +BOOST_MP11_MODULE_EXPORT template using mp_split = typename detail::mp_split_impl>::type; namespace detail { @@ -1341,7 +1340,7 @@ template struct mp_split_impl // mp_join -BOOST_MODULE_EXPORT template using mp_join = mp_apply>>; +BOOST_MP11_MODULE_EXPORT template using mp_join = mp_apply>>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 3549b444..d326d04d 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #ifndef BOOST_USE_MODULES #include #endif @@ -26,7 +26,7 @@ namespace mp11 { // mp_bind_front -BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind_front +BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind_front { // the indirection through mp_defer works around the language inability // to expand U... into a fixed parameter list of an alias template @@ -34,34 +34,34 @@ BOOST_MODULE_EXPORT template class F, class... T> struct mp_b template using fn = typename mp_defer::type; }; -BOOST_MODULE_EXPORT template using mp_bind_front_q = mp_bind_front; +BOOST_MP11_MODULE_EXPORT template using mp_bind_front_q = mp_bind_front; // mp_bind_back -BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind_back +BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind_back { template using fn = typename mp_defer::type; }; -BOOST_MODULE_EXPORT template using mp_bind_back_q = mp_bind_back; +BOOST_MP11_MODULE_EXPORT template using mp_bind_back_q = mp_bind_back; // mp_arg -BOOST_MODULE_EXPORT template struct mp_arg +BOOST_MP11_MODULE_EXPORT template struct mp_arg { template using fn = mp_at_c, I>; }; -BOOST_MODULE_EXPORT using _1 = mp_arg<0>; -BOOST_MODULE_EXPORT using _2 = mp_arg<1>; -BOOST_MODULE_EXPORT using _3 = mp_arg<2>; -BOOST_MODULE_EXPORT using _4 = mp_arg<3>; -BOOST_MODULE_EXPORT using _5 = mp_arg<4>; -BOOST_MODULE_EXPORT using _6 = mp_arg<5>; -BOOST_MODULE_EXPORT using _7 = mp_arg<6>; -BOOST_MODULE_EXPORT using _8 = mp_arg<7>; -BOOST_MODULE_EXPORT using _9 = mp_arg<8>; +BOOST_MP11_MODULE_EXPORT using _1 = mp_arg<0>; +BOOST_MP11_MODULE_EXPORT using _2 = mp_arg<1>; +BOOST_MP11_MODULE_EXPORT using _3 = mp_arg<2>; +BOOST_MP11_MODULE_EXPORT using _4 = mp_arg<3>; +BOOST_MP11_MODULE_EXPORT using _5 = mp_arg<4>; +BOOST_MP11_MODULE_EXPORT using _6 = mp_arg<5>; +BOOST_MP11_MODULE_EXPORT using _7 = mp_arg<6>; +BOOST_MP11_MODULE_EXPORT using _8 = mp_arg<7>; +BOOST_MP11_MODULE_EXPORT using _9 = mp_arg<8>; // mp_bind -BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind; +BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind; namespace detail { @@ -93,7 +93,7 @@ template class F, class... U, class... T> struct eval_bound_a } // namespace detail -BOOST_MODULE_EXPORT template class F, class... T> struct mp_bind +BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind { #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, == 1915 ) private: @@ -111,7 +111,7 @@ BOOST_MODULE_EXPORT template class F, class... T> struct mp_b #endif }; -BOOST_MODULE_EXPORT template using mp_bind_q = mp_bind; +BOOST_MP11_MODULE_EXPORT template using mp_bind_q = mp_bind; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index 44686c73..88e8cb22 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -146,4 +146,12 @@ # define BOOST_MP11_DEPRECATED(msg) #endif +// BOOST_MP11_MODULE_EXPORT + +#ifdef BOOST_USE_MODULES +#define BOOST_MP11_MODULE_EXPORT export +#else +#define BOOST_MP11_MODULE_EXPORT +#endif + #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED diff --git a/include/boost/mp11/detail/modules.hpp b/include/boost/mp11/detail/modules.hpp deleted file mode 100644 index 0e0bdb94..00000000 --- a/include/boost/mp11/detail/modules.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED -#define BOOST_MP11_DETAIL_MODULES_HPP_INCLUDED - -#ifdef BOOST_USE_MODULES -#define BOOST_MODULE_EXPORT export -#else -#define BOOST_MODULE_EXPORT -#endif - -#endif \ No newline at end of file diff --git a/include/boost/mp11/detail/mp_append.hpp b/include/boost/mp11/detail/mp_append.hpp index 0815eed3..fa340ce2 100644 --- a/include/boost/mp11/detail/mp_append.hpp +++ b/include/boost/mp11/detail/mp_append.hpp @@ -14,7 +14,6 @@ #include #include #include -#include namespace boost { @@ -308,7 +307,7 @@ struct append_value_lists #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) -BOOST_MODULE_EXPORT template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; +BOOST_MP11_MODULE_EXPORT template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; #else diff --git a/include/boost/mp11/detail/mp_copy_if.hpp b/include/boost/mp11/detail/mp_copy_if.hpp index 627864a0..8951bf83 100644 --- a/include/boost/mp11/detail/mp_copy_if.hpp +++ b/include/boost/mp11/detail/mp_copy_if.hpp @@ -12,7 +12,6 @@ #include #include #include -#include namespace boost { @@ -40,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; -BOOST_MODULE_EXPORT template using mp_copy_if_q = mp_copy_if; +BOOST_MP11_MODULE_EXPORT template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_copy_if_q = mp_copy_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index 45db8a4e..f876840e 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -11,7 +11,6 @@ #include #include #include -#include namespace boost { @@ -83,7 +82,7 @@ template class L, class... T, class V> struct mp_count_impl using mp_count = typename detail::mp_count_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_count = typename detail::mp_count_impl::type; // mp_count_if namespace detail @@ -139,8 +138,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_count_if = typename detail::mp_count_if_impl::type; -BOOST_MODULE_EXPORT template using mp_count_if_q = mp_count_if; +BOOST_MP11_MODULE_EXPORT template class P> using mp_count_if = typename detail::mp_count_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_count_if_q = mp_count_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_defer.hpp b/include/boost/mp11/detail/mp_defer.hpp index 746edfc1..e57e7abf 100644 --- a/include/boost/mp11/detail/mp_defer.hpp +++ b/include/boost/mp11/detail/mp_defer.hpp @@ -7,7 +7,6 @@ #include #include -#include namespace boost { @@ -34,8 +33,8 @@ template struct mp_if_c_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_if_c = typename detail::mp_if_c_impl::type; -BOOST_MODULE_EXPORT template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; +BOOST_MP11_MODULE_EXPORT template using mp_if_c = typename detail::mp_if_c_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; // mp_valid @@ -74,11 +73,11 @@ template class F, class... T> struct mp_valid_impl } // namespace detail -BOOST_MODULE_EXPORT template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; +BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; #endif -BOOST_MODULE_EXPORT template using mp_valid_q = mp_valid; +BOOST_MP11_MODULE_EXPORT template using mp_valid_q = mp_valid; // mp_defer namespace detail @@ -110,7 +109,7 @@ template class F, class... T> using mp_defer = typename detai #else -BOOST_MODULE_EXPORT template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; +BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; #endif diff --git a/include/boost/mp11/detail/mp_fold.hpp b/include/boost/mp11/detail/mp_fold.hpp index c9536b69..92e8fc00 100644 --- a/include/boost/mp11/detail/mp_fold.hpp +++ b/include/boost/mp11/detail/mp_fold.hpp @@ -12,7 +12,6 @@ #include #include #include -#include namespace boost { @@ -158,8 +157,8 @@ struct mp_fold_impl, V, F> } // namespace detail -BOOST_MODULE_EXPORT template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; -BOOST_MODULE_EXPORT template using mp_fold_q = mp_fold; +BOOST_MP11_MODULE_EXPORT template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; +BOOST_MP11_MODULE_EXPORT template using mp_fold_q = mp_fold; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_front.hpp b/include/boost/mp11/detail/mp_front.hpp index abc01bcd..67149bc0 100644 --- a/include/boost/mp11/detail/mp_front.hpp +++ b/include/boost/mp11/detail/mp_front.hpp @@ -10,7 +10,6 @@ #include #include -#include namespace boost { @@ -43,7 +42,7 @@ template class L, auto A1, auto... A> struct mp_front_impl using mp_front = typename detail::mp_front_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_front = typename detail::mp_front_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_list.hpp b/include/boost/mp11/detail/mp_is_list.hpp index 82e7a270..06457990 100644 --- a/include/boost/mp11/detail/mp_is_list.hpp +++ b/include/boost/mp11/detail/mp_is_list.hpp @@ -9,7 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include +#include namespace boost { @@ -32,7 +32,7 @@ template class L, class... T> struct mp_is_list_impl> } // namespace detail -BOOST_MODULE_EXPORT template using mp_is_list = typename detail::mp_is_list_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_is_list = typename detail::mp_is_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_value_list.hpp b/include/boost/mp11/detail/mp_is_value_list.hpp index 537fe8cc..37d210ba 100644 --- a/include/boost/mp11/detail/mp_is_value_list.hpp +++ b/include/boost/mp11/detail/mp_is_value_list.hpp @@ -7,7 +7,6 @@ #include #include -#include namespace boost { @@ -34,7 +33,7 @@ template class L, auto... A> struct mp_is_value_list_impl using mp_is_value_list = typename detail::mp_is_value_list_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_is_value_list = typename detail::mp_is_value_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_list.hpp b/include/boost/mp11/detail/mp_list.hpp index 1b1582d6..b5c9e3a3 100644 --- a/include/boost/mp11/detail/mp_list.hpp +++ b/include/boost/mp11/detail/mp_list.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include namespace boost { @@ -17,7 +16,7 @@ namespace mp11 { // mp_list -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template struct mp_list { }; diff --git a/include/boost/mp11/detail/mp_list_v.hpp b/include/boost/mp11/detail/mp_list_v.hpp index 33946616..432e6962 100644 --- a/include/boost/mp11/detail/mp_list_v.hpp +++ b/include/boost/mp11/detail/mp_list_v.hpp @@ -6,7 +6,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include namespace boost { @@ -16,7 +15,7 @@ namespace mp11 #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) // mp_list_v -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template struct mp_list_v { }; diff --git a/include/boost/mp11/detail/mp_map_find.hpp b/include/boost/mp11/detail/mp_map_find.hpp index fca6e89e..4acade1e 100644 --- a/include/boost/mp11/detail/mp_map_find.hpp +++ b/include/boost/mp11/detail/mp_map_find.hpp @@ -10,7 +10,6 @@ #include #include -#include #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1930 ) @@ -80,7 +79,7 @@ template class M, class... T, class K> struct mp_map_find_imp } // namespace detail -BOOST_MODULE_EXPORT template using mp_map_find = typename detail::mp_map_find_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_map_find = typename detail::mp_map_find_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_min_element.hpp b/include/boost/mp11/detail/mp_min_element.hpp index 0da2d381..bee4aa36 100644 --- a/include/boost/mp11/detail/mp_min_element.hpp +++ b/include/boost/mp11/detail/mp_min_element.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace boost { @@ -29,8 +29,8 @@ template class P> struct select_min } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; -BOOST_MODULE_EXPORT template using mp_min_element_q = mp_min_element; +BOOST_MP11_MODULE_EXPORT template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; +BOOST_MP11_MODULE_EXPORT template using mp_min_element_q = mp_min_element; // mp_max_element namespace detail @@ -43,8 +43,8 @@ template class P> struct select_max } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; -BOOST_MODULE_EXPORT template using mp_max_element_q = mp_max_element; +BOOST_MP11_MODULE_EXPORT template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; +BOOST_MP11_MODULE_EXPORT template using mp_max_element_q = mp_max_element; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index 83f9acfb..725123e0 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include #ifndef BOOST_USE_MODULES #include #endif @@ -79,7 +78,7 @@ template using mp_plus = typename detail::mp_plus_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_plus = typename detail::mp_plus_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_remove_if.hpp b/include/boost/mp11/detail/mp_remove_if.hpp index 0c5a6cce..62a9d951 100644 --- a/include/boost/mp11/detail/mp_remove_if.hpp +++ b/include/boost/mp11/detail/mp_remove_if.hpp @@ -12,7 +12,6 @@ #include #include #include -#include namespace boost { @@ -40,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MODULE_EXPORT template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; -BOOST_MODULE_EXPORT template using mp_remove_if_q = mp_remove_if; +BOOST_MP11_MODULE_EXPORT template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_remove_if_q = mp_remove_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_rename.hpp b/include/boost/mp11/detail/mp_rename.hpp index 9e9e2c10..ade0266a 100644 --- a/include/boost/mp11/detail/mp_rename.hpp +++ b/include/boost/mp11/detail/mp_rename.hpp @@ -11,7 +11,6 @@ #include #include #include -#include namespace boost { @@ -41,13 +40,13 @@ template class L, auto... A, template class B> struc } // namespace detail -BOOST_MODULE_EXPORT template class B> using mp_rename = typename detail::mp_rename_impl::type; +BOOST_MP11_MODULE_EXPORT template class B> using mp_rename = typename detail::mp_rename_impl::type; // mp_apply -BOOST_MODULE_EXPORT template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; +BOOST_MP11_MODULE_EXPORT template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; // mp_apply_q -BOOST_MODULE_EXPORT template using mp_apply_q = typename detail::mp_rename_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_apply_q = typename detail::mp_rename_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index df304add..f008593f 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -6,7 +6,6 @@ // https://www.boost.org/LICENSE_1_0.txt #include -#include #ifndef BOOST_USE_MODULES #include #endif @@ -18,7 +17,7 @@ namespace boost namespace mp11 { -BOOST_MODULE_EXPORT template using mp_value = std::integral_constant; +BOOST_MP11_MODULE_EXPORT template using mp_value = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_void.hpp b/include/boost/mp11/detail/mp_void.hpp index 36bcada0..160611a9 100644 --- a/include/boost/mp11/detail/mp_void.hpp +++ b/include/boost/mp11/detail/mp_void.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include namespace boost { @@ -27,7 +26,7 @@ template struct mp_void_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_void = typename detail::mp_void_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_void = typename detail::mp_void_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index 8c269259..9465b4c2 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -10,7 +10,6 @@ #include #include -#include #ifndef BOOST_USE_MODULES #include #include @@ -368,13 +367,13 @@ template<> struct mp_with_index_impl_<16> } // namespace detail -BOOST_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +BOOST_MP11_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { assert( i < N ); return detail::mp_with_index_impl_::template call<0>( i, std::forward(f) ); } -BOOST_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +BOOST_MP11_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { return mp_with_index( i, std::forward(f) ); } diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 324aaf3a..3f12546a 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -16,7 +16,6 @@ #include #include #include -#include #ifndef BOOST_USE_MODULES #include #endif @@ -78,7 +77,7 @@ template struct mp_and_impl< mp_list, mp_void.. } // namespace detail -BOOST_MODULE_EXPORT template using mp_and = typename detail::mp_and_impl>::type; +BOOST_MP11_MODULE_EXPORT template using mp_and = typename detail::mp_and_impl>::type; #endif @@ -90,7 +89,7 @@ template using mp_all = mp_bool< mp_count_if< mp_list, mp_not #else -BOOST_MODULE_EXPORT template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; +BOOST_MP11_MODULE_EXPORT template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; #endif @@ -102,7 +101,7 @@ template struct mp_or_impl; } // namespace detail -BOOST_MODULE_EXPORT template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; +BOOST_MP11_MODULE_EXPORT template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; namespace detail { @@ -132,7 +131,7 @@ template using mp_any = mp_bool< mp_count_if< mp_list, mp_to_b #else -BOOST_MODULE_EXPORT template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; +BOOST_MP11_MODULE_EXPORT template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; #endif @@ -154,7 +153,7 @@ template struct mp_same_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_same = typename detail::mp_same_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_same = typename detail::mp_same_impl::type; // mp_similar namespace detail @@ -199,7 +198,7 @@ template struct mp_similar_impl using mp_similar = typename detail::mp_similar_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_similar = typename detail::mp_similar_impl::type; #if BOOST_MP11_GCC # pragma GCC diagnostic push @@ -207,17 +206,17 @@ BOOST_MODULE_EXPORT template using mp_similar = typename detail::mp_ #endif // mp_less -BOOST_MODULE_EXPORT template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; +BOOST_MP11_MODULE_EXPORT template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; #if BOOST_MP11_GCC # pragma GCC diagnostic pop #endif // mp_min -BOOST_MODULE_EXPORT template using mp_min = mp_min_element, mp_less>; +BOOST_MP11_MODULE_EXPORT template using mp_min = mp_min_element, mp_less>; // mp_max -BOOST_MODULE_EXPORT template using mp_max = mp_max_element, mp_less>; +BOOST_MP11_MODULE_EXPORT template using mp_max = mp_max_element, mp_less>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index 79947dfa..796a1428 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -9,7 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include +#include #ifndef BOOST_USE_MODULES #include #endif @@ -31,13 +31,13 @@ namespace mp11 { // integer_sequence -BOOST_MODULE_EXPORT template struct integer_sequence +BOOST_MP11_MODULE_EXPORT template struct integer_sequence { }; #if defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) -BOOST_MODULE_EXPORT template using make_integer_sequence = __make_integer_seq; +BOOST_MP11_MODULE_EXPORT template using make_integer_sequence = __make_integer_seq; #else @@ -101,18 +101,18 @@ template struct make_integer_sequence_impl: iseq_if_c using make_integer_sequence = typename detail::make_integer_sequence_impl::type; +BOOST_MP11_MODULE_EXPORT template using make_integer_sequence = typename detail::make_integer_sequence_impl::type; #endif // defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) // index_sequence -BOOST_MODULE_EXPORT template using index_sequence = integer_sequence; +BOOST_MP11_MODULE_EXPORT template using index_sequence = integer_sequence; // make_index_sequence -BOOST_MODULE_EXPORT template using make_index_sequence = make_integer_sequence; +BOOST_MP11_MODULE_EXPORT template using make_index_sequence = make_integer_sequence; // index_sequence_for -BOOST_MODULE_EXPORT template using index_sequence_for = make_integer_sequence; +BOOST_MP11_MODULE_EXPORT template using index_sequence_for = make_integer_sequence; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index 7983d5e7..bc8c05bd 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -11,7 +11,6 @@ #include #include #include -#include #ifndef BOOST_USE_MODULES #include #include @@ -28,22 +27,22 @@ namespace mp11 { // mp_bool -BOOST_MODULE_EXPORT template using mp_bool = std::integral_constant; +BOOST_MP11_MODULE_EXPORT template using mp_bool = std::integral_constant; -BOOST_MODULE_EXPORT using mp_true = mp_bool; -BOOST_MODULE_EXPORT using mp_false = mp_bool; +BOOST_MP11_MODULE_EXPORT using mp_true = mp_bool; +BOOST_MP11_MODULE_EXPORT using mp_false = mp_bool; // mp_to_bool -BOOST_MODULE_EXPORT template using mp_to_bool = mp_bool( T::value )>; +BOOST_MP11_MODULE_EXPORT template using mp_to_bool = mp_bool( T::value )>; // mp_not -BOOST_MODULE_EXPORT template using mp_not = mp_bool< !T::value >; +BOOST_MP11_MODULE_EXPORT template using mp_not = mp_bool< !T::value >; // mp_int -BOOST_MODULE_EXPORT template using mp_int = std::integral_constant; +BOOST_MP11_MODULE_EXPORT template using mp_int = std::integral_constant; // mp_size_t -BOOST_MODULE_EXPORT template using mp_size_t = std::integral_constant; +BOOST_MP11_MODULE_EXPORT template using mp_size_t = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index e5fb087e..dca53ce9 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include #if BOOST_MP11_WORKAROUND(BOOST_MP11_MSVC, <= 1800) @@ -40,7 +39,7 @@ template struct lambda_impl; } // namespace detail // mp_lambda -BOOST_MODULE_EXPORT template using mp_lambda = typename detail::lambda_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_lambda = typename detail::lambda_impl::type; namespace detail { diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index ad4dcf32..11f11368 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #ifndef BOOST_USE_MODULES #include #endif @@ -36,7 +35,7 @@ namespace mp11 // in detail/mp_list.hpp // mp_list_c -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_list_c = mp_list...>; // mp_list_v @@ -73,11 +72,11 @@ template class L, auto... A> struct mp_size_impl> } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_size = typename detail::mp_size_impl::type; // mp_empty -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_empty = mp_bool< mp_size::value == 0 >; // mp_assign @@ -115,11 +114,11 @@ template class L1, auto... A, template class L2, auto } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_assign = typename detail::mp_assign_impl::type; // mp_clear -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_clear = mp_assign>; // mp_front @@ -151,15 +150,15 @@ template class L, auto A1, auto... A> struct mp_pop_front_impl } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_pop_front = typename detail::mp_pop_front_impl::type; // mp_first -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_first = mp_front; // mp_rest -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_rest = mp_pop_front; // mp_second @@ -188,7 +187,7 @@ template class L, auto A1, auto A2, auto... A> struct mp_secon } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_second = typename detail::mp_second_impl::type; // mp_third @@ -217,7 +216,7 @@ template class L, auto A1, auto A2, auto A3, auto... A> struct } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_third = typename detail::mp_third_impl::type; // mp_push_front @@ -245,7 +244,7 @@ template class L, auto... A, class... T> struct mp_push_front_ } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_push_front = typename detail::mp_push_front_impl::type; // mp_push_back @@ -273,7 +272,7 @@ template class L, auto... A, class... T> struct mp_push_back_i } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_push_back = typename detail::mp_push_back_impl::type; // mp_rename @@ -304,7 +303,7 @@ template class L, auto... A, template class B> struct } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class B> using mp_rename_v = typename detail::mp_rename_v_impl::type; #endif @@ -335,11 +334,11 @@ template class L, auto A1, auto... A, class T> struct mp_repla } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_replace_front = typename detail::mp_replace_front_impl::type; // mp_replace_first -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_replace_first = typename detail::mp_replace_front_impl::type; // mp_replace_second @@ -368,7 +367,7 @@ template class L, auto A1, auto A2, auto... A, class T> struct } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_replace_second = typename detail::mp_replace_second_impl::type; // mp_replace_third @@ -397,7 +396,7 @@ template class L, auto A1, auto A2, auto A3, auto... A, class } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_replace_third = typename detail::mp_replace_third_impl::type; // mp_transform_front @@ -426,15 +425,15 @@ template class L, auto A1, auto... A, template class } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_front = typename detail::mp_transform_front_impl::type; -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_transform_front_q = mp_transform_front; // mp_transform_first -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_first = typename detail::mp_transform_front_impl::type; -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_transform_first_q = mp_transform_first; // mp_transform_second @@ -463,9 +462,9 @@ template class L, auto A1, auto A2, auto... A, template class F> using mp_transform_second = typename detail::mp_transform_second_impl::type; -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_transform_second_q = mp_transform_second; // mp_transform_third @@ -494,9 +493,9 @@ template class L, auto A1, auto A2, auto A3, auto... A, templa } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_third = typename detail::mp_transform_third_impl::type; -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_transform_third_q = mp_transform_third; } // namespace mp11 diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index 0312869b..bca144d9 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -9,7 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include +#include #include #include #include @@ -26,10 +26,10 @@ namespace mp11 { // mp_map_contains -BOOST_MODULE_EXPORT template using mp_map_contains = mp_not, void>>; +BOOST_MP11_MODULE_EXPORT template using mp_map_contains = mp_not, void>>; // mp_map_insert -BOOST_MODULE_EXPORT template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; +BOOST_MP11_MODULE_EXPORT template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; // mp_map_replace namespace detail @@ -50,7 +50,7 @@ template class M, class... U, class T> struct mp_map_replace_ } // namespace detail -BOOST_MODULE_EXPORT template using mp_map_replace = typename detail::mp_map_replace_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_map_replace = typename detail::mp_map_replace_impl::type; // mp_map_update namespace detail @@ -68,8 +68,8 @@ template class F> struct mp_map_update_impl } // namespace detail -BOOST_MODULE_EXPORT template class F> using mp_map_update = typename detail::mp_map_update_impl::type; -BOOST_MODULE_EXPORT template using mp_map_update_q = mp_map_update; +BOOST_MP11_MODULE_EXPORT template class F> using mp_map_update = typename detail::mp_map_update_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_map_update_q = mp_map_update; // mp_map_erase namespace detail @@ -83,10 +83,10 @@ template struct mp_map_erase_impl } // namespace detail -BOOST_MODULE_EXPORT template using mp_map_erase = typename detail::mp_map_erase_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_map_erase = typename detail::mp_map_erase_impl::type; // mp_map_keys -BOOST_MODULE_EXPORT template using mp_map_keys = mp_transform; +BOOST_MP11_MODULE_EXPORT template using mp_map_keys = mp_transform; // mp_is_map namespace detail @@ -114,7 +114,7 @@ template class M, class... T> struct mp_is_map_impl> } // namespace detail -BOOST_MODULE_EXPORT template using mp_is_map = typename detail::mp_is_map_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_is_map = typename detail::mp_is_map_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index e40dfa97..8780bcff 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -8,7 +8,6 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include #include #include #include @@ -42,7 +41,7 @@ template class L, class... T, class V> struct mp_set_contains } // namespace detail -BOOST_MODULE_EXPORT template using mp_set_contains = typename detail::mp_set_contains_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_set_contains = typename detail::mp_set_contains_impl::type; // mp_set_push_back namespace detail @@ -65,7 +64,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -BOOST_MODULE_EXPORT template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; // mp_set_push_front namespace detail @@ -93,7 +92,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -BOOST_MODULE_EXPORT template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; // mp_is_set namespace detail @@ -141,7 +140,7 @@ template class L, class... T> struct mp_is_set_impl> } // namespace detail -BOOST_MODULE_EXPORT template using mp_is_set = typename detail::mp_is_set_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_is_set = typename detail::mp_is_set_impl::type; // mp_set_union namespace detail @@ -174,7 +173,7 @@ template struct mp_set_union_impl using mp_set_union = typename detail::mp_set_union_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_set_union = typename detail::mp_set_union_impl::type; // mp_set_intersection namespace detail @@ -202,7 +201,7 @@ template struct mp_set_intersection_impl: mp_defer } // namespace detail -BOOST_MODULE_EXPORT template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; // mp_set_difference namespace detail @@ -215,7 +214,7 @@ template struct in_any_set } // namespace detail -BOOST_MODULE_EXPORT template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; +BOOST_MP11_MODULE_EXPORT template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index d55a665f..912a0cfc 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -8,7 +8,6 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include #include #include #include @@ -44,7 +43,7 @@ template BOOST_MP11_CONSTEXPR auto tuple_ap } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_apply( F && f, Tp && tp ) @@ -64,7 +63,7 @@ template BOOST_MP11_CONSTEXPR T construct_f } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR T construct_from_tuple( Tp && tp ) @@ -89,7 +88,7 @@ template BOOST_MP11_CONSTEXPR F tuple_for_each_impl( Tp && /* } // namespace detail -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F tuple_for_each( Tp && tp, F && f ) { using seq = make_index_sequence::type>::value>; @@ -157,7 +156,7 @@ BOOST_MP11_CONSTEXPR auto tuple_transform_impl( integer_sequence::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) @@ -168,7 +167,7 @@ BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) #else -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template::type>::value>...>, class E = mp_if, mp_front>, diff --git a/include/boost/mp11/utility.hpp b/include/boost/mp11/utility.hpp index bf8e5c41..6cc1b62c 100644 --- a/include/boost/mp11/utility.hpp +++ b/include/boost/mp11/utility.hpp @@ -8,7 +8,6 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include #include #include #include @@ -23,18 +22,18 @@ namespace mp11 { // mp_identity -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template struct mp_identity { using type = T; }; // mp_identity_t -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_identity_t = typename mp_identity::type; // mp_inherit -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template struct mp_inherit: T... {}; // mp_if, mp_if_c @@ -59,21 +58,21 @@ template class F, class... U> struct mp_eval_if_c_im } // namespace detail -BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; -BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; -BOOST_MODULE_EXPORT template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; +BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; +BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; +BOOST_MP11_MODULE_EXPORT template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; // mp_eval_if_not -BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; -BOOST_MODULE_EXPORT template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; +BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; +BOOST_MP11_MODULE_EXPORT template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; // mp_eval_or -BOOST_MODULE_EXPORT template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; -BOOST_MODULE_EXPORT template using mp_eval_or_q = mp_eval_or; +BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; +BOOST_MP11_MODULE_EXPORT template using mp_eval_or_q = mp_eval_or; // mp_valid_and_true -BOOST_MODULE_EXPORT template class F, class... T> using mp_valid_and_true = mp_eval_or; -BOOST_MODULE_EXPORT template using mp_valid_and_true_q = mp_valid_and_true; +BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_valid_and_true = mp_eval_or; +BOOST_MP11_MODULE_EXPORT template using mp_valid_and_true_q = mp_valid_and_true; // mp_cond @@ -87,7 +86,7 @@ template struct mp_cond_impl; } // namespace detail -BOOST_MODULE_EXPORT template using mp_cond = typename detail::mp_cond_impl::type; +BOOST_MP11_MODULE_EXPORT template using mp_cond = typename detail::mp_cond_impl::type; namespace detail { @@ -101,7 +100,7 @@ template struct mp_cond_impl: mp_defer class F> struct mp_quote { // the indirection through mp_defer works around the language inability @@ -111,7 +110,7 @@ template class F> struct mp_quote }; // mp_quote_trait -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class F> struct mp_quote_trait { template using fn = typename F::type; @@ -135,18 +134,18 @@ template using mp_invoke_q = typename mp_defer using mp_invoke_q = typename Q::template fn; +BOOST_MP11_MODULE_EXPORT template using mp_invoke_q = typename Q::template fn; #endif // mp_not_fn

-BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class P> struct mp_not_fn { template using fn = mp_not< mp_invoke_q, T...> >; }; -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template using mp_not_fn_q = mp_not_fn; // mp_compose @@ -159,7 +158,7 @@ template using mp_compose_helper = mp_list< mp_apply_q > #if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template class... F> struct mp_compose { template using fn = mp_front< mp_fold...>, mp_list, detail::mp_compose_helper> >; @@ -167,7 +166,7 @@ template class... F> struct mp_compose #endif -BOOST_MODULE_EXPORT +BOOST_MP11_MODULE_EXPORT template struct mp_compose_q { template using fn = mp_front< mp_fold, mp_list, detail::mp_compose_helper> >; From 87b509377936d26301cb7330ad098dba3d4658dd Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 17:25:05 +0100 Subject: [PATCH 32/86] Follow format conventions --- include/boost/mp11/detail/config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index 88e8cb22..70b1f8a3 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -149,9 +149,9 @@ // BOOST_MP11_MODULE_EXPORT #ifdef BOOST_USE_MODULES -#define BOOST_MP11_MODULE_EXPORT export +# define BOOST_MP11_MODULE_EXPORT export #else -#define BOOST_MP11_MODULE_EXPORT +# define BOOST_MP11_MODULE_EXPORT #endif #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED From 0db344057aa6af9c14b4a90bdef5242c99baf4b5 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 18:15:43 +0100 Subject: [PATCH 33/86] CI prototype --- .github/workflows/ci.yml | 32 ++++++++++++------------------- tools/setup_boost_with_modules.py | 25 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 tools/setup_boost_with_modules.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 554d23af..8dcac1e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -222,8 +222,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python3 tools/boostdep/depinst/depinst.py $LIBRARY + python3 tools/setup_boost_with_modules.py # Temporary ./bootstrap.sh ./b2 -d0 headers @@ -282,8 +281,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python tools/setup_boost_with_modules.py # Temporary cmd /c bootstrap b2 -d0 headers @@ -331,8 +329,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory run: | @@ -380,8 +377,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python tools/setup_boost_with_modules.py # Temporary - name: Configure run: | @@ -439,8 +435,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python3 tools/setup_boost_with_modules.py # Temporary - name: Configure run: | @@ -574,9 +569,9 @@ jobs: - name: Setup Boost run: | cd .. - git clone --depth 1 https://github.com/boostorg/assert + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/boostorg/core + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - name: Run Tests run: | @@ -607,9 +602,9 @@ jobs: - name: Setup Boost run: | cd .. - git clone --depth 1 https://github.com/boostorg/assert + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/boostorg/core + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - name: Run Tests shell: cmd @@ -650,8 +645,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory (Debug) shell: cmd @@ -699,8 +693,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python tools/setup_boost_with_modules.py # Temporary - name: Configure shell: cmd @@ -766,8 +759,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python tools/setup_boost_with_modules.py # Temporary - name: Configure shell: cmd diff --git a/tools/setup_boost_with_modules.py b/tools/setup_boost_with_modules.py new file mode 100644 index 00000000..c1f39baa --- /dev/null +++ b/tools/setup_boost_with_modules.py @@ -0,0 +1,25 @@ +#!/usr/bin/python3 + +# This is a temporary workaround to make CIs use the +# "Boost with C++20 modules" proposal, instead of the regular develop branch +# Call it instead of depinst + +from subprocess import run + +def main(): + + submodules = [ + ('tools/cmake', 'https://github.com/anarthal/boost-cmake', 'feature/cxx20-modules'), + ('libs/headers', 'https://github.com/anarthal/headers', 'feature/cxx20-modules'), + ('libs/config', 'https://github.com/anarthal/config', 'feature/cxx20-modules'), + ('libs/assert', 'https://github.com/anarthal/assert', 'feature/cxx20-modules'), + ('libs/core', 'https://github.com/anarthal/core', 'feature/cxx20-modules'), + ('libs/throw_exception','https://github.com/anarthal/throw_exception','feature/cxx20-modules'), + ('libs/static_assert', 'https://github.com/boostorg/static_assert', 'develop'), + ] + + for submodule, url, branch in submodules: + run(["git", "clone", url, "--depth", "1", "-b", branch, submodule]) + +if __name__ == '__main__': + main() From 925956389664ddb96f66a7792fbbe00578198fd5 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 18:16:44 +0100 Subject: [PATCH 34/86] force CI run From d40a6e087facc847d5d42cde4b7151213261f69a Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 18:18:42 +0100 Subject: [PATCH 35/86] Incorrect script path --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dcac1e8..84bc0746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -281,7 +281,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary cmd /c bootstrap b2 -d0 headers @@ -329,7 +329,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory run: | @@ -377,7 +377,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure run: | @@ -645,7 +645,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory (Debug) shell: cmd @@ -693,7 +693,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure shell: cmd @@ -759,7 +759,7 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python tools/setup_boost_with_modules.py # Temporary + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure shell: cmd From 7e06b9352415a8f9662a03b14f2bd34f7a1d1c1e Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 18:29:33 +0100 Subject: [PATCH 36/86] Incorrect script path (2) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84bc0746..e546657d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -222,7 +222,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 tools/setup_boost_with_modules.py # Temporary + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary ./bootstrap.sh ./b2 -d0 headers @@ -435,7 +435,7 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 tools/setup_boost_with_modules.py # Temporary + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure run: | From 7c9f1428b7669584b0a5076a834d9a61348de79f Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 3 Jan 2025 18:44:52 +0100 Subject: [PATCH 37/86] Added some modules CIs --- .github/workflows/ci.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e546657d..a2ab3d71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,6 +299,9 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 + - os: ubuntu-24.04 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build - os: macos-13 - os: macos-14 - os: macos-15 @@ -335,7 +338,7 @@ jobs: run: | cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test mkdir __build__ && cd __build__ - cmake .. + cmake ${{ matrix.cmake-args }} .. cmake --build . ctest --output-on-failure --no-tests=error @@ -347,6 +350,9 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 + - os: ubuntu-24.04 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build - os: macos-13 - os: macos-14 - os: macos-15 @@ -383,7 +389,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - name: Install run: | @@ -393,7 +399,7 @@ jobs: - name: Use the installed library run: | cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. cmake --build . ctest --output-on-failure --no-tests=error @@ -405,6 +411,9 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 + - os: ubuntu-24.04 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build - os: macos-13 - os: macos-14 - os: macos-15 @@ -441,7 +450,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. - name: Build tests run: | @@ -622,12 +631,19 @@ jobs: include: - os: windows-2019 - os: windows-2022 + - os: windows-2022 + install: ninja + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 + - name: Install packages + if: matrix.install + run: choco install ${{matrix.install}} + - name: Setup Boost shell: cmd run: | @@ -652,7 +668,7 @@ jobs: run: | cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ - cmake .. + cmake ${{ matrix.cmake-args }} .. cmake --build . --config Debug ctest --output-on-failure --no-tests=error -C Debug From 2cace6f8983cd0314af46d3d73dc2cbbb136abdd Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:30:04 +0100 Subject: [PATCH 38/86] Experiment with null container --- .github/workflows/ci.yml | 1494 +++++++++++++++++++------------------- 1 file changed, 748 insertions(+), 746 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2ab3d71..da717277 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,284 +12,284 @@ env: UBSAN_OPTIONS: print_stacktrace=1 jobs: - posix: - strategy: - fail-fast: false - matrix: - include: - - toolset: gcc-4.8 - cxxstd: "03,11" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-4.8 - - toolset: gcc-4.9 - cxxstd: "03,11" - container: ubuntu:16.04 - os: ubuntu-latest - install: g++-4.9 - - toolset: gcc-5 - cxxstd: "03,11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-5 - - toolset: gcc-6 - cxxstd: "03,11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-6 - - toolset: gcc-7 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: g++-7 - - toolset: gcc-8 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-8 - - toolset: gcc-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: gcc-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-22.04 - install: g++-10 - - toolset: gcc-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-22.04 - - toolset: gcc-12 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-22.04 - install: g++-12 - - toolset: gcc-13 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-latest - container: ubuntu:24.04 - install: g++-13 - - toolset: gcc-14 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-latest - container: ubuntu:24.04 - install: g++-14 - - toolset: clang - compiler: clang++-3.9 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-3.9 - - toolset: clang - compiler: clang++-4.0 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-4.0 - - toolset: clang - compiler: clang++-5.0 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-5.0 - - toolset: clang - compiler: clang++-6.0 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-6.0 - - toolset: clang - compiler: clang++-7 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-7 - - toolset: clang - compiler: clang++-8 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-8 - - toolset: clang - compiler: clang++-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-9 - - toolset: clang - compiler: clang++-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-12 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-13 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-13 - - toolset: clang - compiler: clang++-14 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-14 - - toolset: clang - compiler: clang++-15 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-15 - - toolset: clang - compiler: clang++-16 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-16 - - toolset: clang - compiler: clang++-17 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-17 - - toolset: clang - compiler: clang++-18 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-18 - - toolset: clang - compiler: clang++-19 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.10 - os: ubuntu-latest - install: clang-19 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-13 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-14 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-15 - - runs-on: ${{matrix.os}} - - container: - image: ${{matrix.container}} - volumes: - - /node20217:/node20217:rw,rshared - - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} - - defaults: - run: - shell: bash - - steps: - - name: Setup container environment - if: matrix.container - run: | - apt-get update - apt-get -y install sudo python3 git g++ curl xz-utils - - - name: Install nodejs20glibc2.17 - if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} - run: | - curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz - tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - ldd /__e/node20/bin/node - - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: | - sudo apt-get update - sudo apt-get -y install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - ./bootstrap.sh - ./b2 -d0 headers - - - name: Create user-config.jam - if: matrix.compiler - run: | - echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - - - name: Run tests - run: | - cd ../boost-root - ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release - - windows: - strategy: - fail-fast: false - matrix: - include: - # msvc-14.0 not included, because it fails with "compiler is out of heap space" - - toolset: msvc-14.2 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2019 - - toolset: msvc-14.3 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: clang-win - cxxstd: "14,17,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: gcc - cxxstd: "03,11,14,17,2a" - addrmd: 64 - os: windows-2019 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - cmd /c bootstrap - b2 -d0 headers - - - name: Run tests - shell: cmd - run: | - cd ../boost-root - b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + # posix: + # strategy: + # fail-fast: false + # matrix: + # include: + # - toolset: gcc-4.8 + # cxxstd: "03,11" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-4.8 + # - toolset: gcc-4.9 + # cxxstd: "03,11" + # container: ubuntu:16.04 + # os: ubuntu-latest + # install: g++-4.9 + # - toolset: gcc-5 + # cxxstd: "03,11,14,1z" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-5 + # - toolset: gcc-6 + # cxxstd: "03,11,14,1z" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-6 + # - toolset: gcc-7 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: g++-7 + # - toolset: gcc-8 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # install: g++-8 + # - toolset: gcc-9 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: gcc-10 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-22.04 + # install: g++-10 + # - toolset: gcc-11 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-22.04 + # - toolset: gcc-12 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-22.04 + # install: g++-12 + # - toolset: gcc-13 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-latest + # container: ubuntu:24.04 + # install: g++-13 + # - toolset: gcc-14 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-latest + # container: ubuntu:24.04 + # install: g++-14 + # - toolset: clang + # compiler: clang++-3.9 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-3.9 + # - toolset: clang + # compiler: clang++-4.0 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-4.0 + # - toolset: clang + # compiler: clang++-5.0 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-5.0 + # - toolset: clang + # compiler: clang++-6.0 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-6.0 + # - toolset: clang + # compiler: clang++-7 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-7 + # - toolset: clang + # compiler: clang++-8 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-8 + # - toolset: clang + # compiler: clang++-9 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # install: clang-9 + # - toolset: clang + # compiler: clang++-10 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-11 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-12 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-13 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-13 + # - toolset: clang + # compiler: clang++-14 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-14 + # - toolset: clang + # compiler: clang++-15 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-15 + # - toolset: clang + # compiler: clang++-16 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-16 + # - toolset: clang + # compiler: clang++-17 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-17 + # - toolset: clang + # compiler: clang++-18 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-18 + # - toolset: clang + # compiler: clang++-19 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.10 + # os: ubuntu-latest + # install: clang-19 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-13 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-14 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-15 + + # runs-on: ${{matrix.os}} + + # container: + # image: ${{matrix.container}} + # volumes: + # - /node20217:/node20217:rw,rshared + # - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + + # defaults: + # run: + # shell: bash + + # steps: + # - name: Setup container environment + # if: matrix.container + # run: | + # apt-get update + # apt-get -y install sudo python3 git g++ curl xz-utils + + # - name: Install nodejs20glibc2.17 + # if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} + # run: | + # curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz + # tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + # ldd /__e/node20/bin/node + + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: | + # sudo apt-get update + # sudo apt-get -y install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + # ./bootstrap.sh + # ./b2 -d0 headers + + # - name: Create user-config.jam + # if: matrix.compiler + # run: | + # echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + + # - name: Run tests + # run: | + # cd ../boost-root + # ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release + + # windows: + # strategy: + # fail-fast: false + # matrix: + # include: + # # msvc-14.0 not included, because it fails with "compiler is out of heap space" + # - toolset: msvc-14.2 + # cxxstd: "14,17,20,latest" + # addrmd: 32,64 + # os: windows-2019 + # - toolset: msvc-14.3 + # cxxstd: "14,17,20,latest" + # addrmd: 32,64 + # os: windows-2022 + # - toolset: clang-win + # cxxstd: "14,17,latest" + # addrmd: 32,64 + # os: windows-2022 + # - toolset: gcc + # cxxstd: "03,11,14,17,2a" + # addrmd: 64 + # os: windows-2019 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + # cmd /c bootstrap + # b2 -d0 headers + + # - name: Run tests + # shell: cmd + # run: | + # cd ../boost-root + # b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker posix-cmake-subdir: strategy: @@ -300,13 +300,15 @@ jobs: - os: ubuntu-22.04 - os: ubuntu-24.04 - os: ubuntu-24.04 + container: ubuntu:24.10 cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja install: ninja-build - - os: macos-13 - - os: macos-14 - - os: macos-15 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 runs-on: ${{matrix.os}} + container: ${{ matrix.container }} steps: - uses: actions/checkout@v4 @@ -342,468 +344,468 @@ jobs: cmake --build . ctest --output-on-failure --no-tests=error - posix-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: ubuntu-24.04 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - - - name: Install - run: | - cd ../boost-root/__build__ - cmake --build . --target install - - - name: Use the installed library - run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - cmake --build . - ctest --output-on-failure --no-tests=error - - posix-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: ubuntu-24.04 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. - - - name: Build tests - run: | - cd ../boost-root/__build__ - cmake --build . --target tests - - - name: Run tests - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error - - standalone-cmake-subdir: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Use library with add_subdirectory - run: | - cd test/cmake_subdir_test - mkdir __build__ && cd __build__ - cmake .. - cmake --build . - ctest --output-on-failure --no-tests=error - - standalone-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Configure - run: | - mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - - - name: Install - run: | - cd __build__ - cmake --build . --target install - - - name: Use the installed library - run: | - cd test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . - ctest --output-on-failure --no-tests=error - - standalone-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Configure - run: | - mkdir __build__ && cd __build__ - cmake -DBUILD_TESTING=ON .. - - - name: Build tests - run: | - cd __build__ - cmake --build . --target tests - - - name: Run tests - run: | - cd __build__ - ctest --output-on-failure --no-tests=error - - cuda-linux: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.16 - with: - cuda: '11.7.1' - linux-local-args: '["--toolkit"]' - - - name: Setup Boost - run: | - cd .. - git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - - name: Run Tests - run: | - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp - - cuda-windows: - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.16 - - uses: ilammy/msvc-dev-cmd@v1 - - - name: Setup Boost - run: | - cd .. - git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - - name: Run Tests - shell: cmd - run: | - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b - - windows-cmake-subdir: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - os: windows-2022 - install: ninja - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: choco install ${{matrix.install}} - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Use library with add_subdirectory (Debug) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test - mkdir __build__ && cd __build__ - cmake ${{ matrix.cmake-args }} .. - cmake --build . --config Debug - ctest --output-on-failure --no-tests=error -C Debug - - - name: Use library with add_subdirectory (Release) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ - cmake --build . --config Release - ctest --output-on-failure --no-tests=error -C Release - - windows-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - shell: cmd - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - - - name: Install (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target install --config Debug - - - name: Install (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target install --config Release - - - name: Use the installed library (Debug) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - cmake --build . --config Debug - ctest --output-on-failure --no-tests=error -C Debug - - - name: Use the installed library (Release) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ - cmake --build . --config Release - ctest --output-on-failure --no-tests=error -C Release - - windows-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - shell: cmd - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. - - - name: Build tests (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target tests --config Debug - - - name: Run tests (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error -C Debug - - - name: Build tests (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target tests --config Release - - - name: Run tests (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error -C Release + # posix-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + + # - name: Install + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install + + # - name: Use the installed library + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # posix-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + + # - name: Build tests + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests + + # - name: Run tests + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Use library with add_subdirectory + # run: | + # cd test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Configure + # run: | + # mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + + # - name: Install + # run: | + # cd __build__ + # cmake --build . --target install + + # - name: Use the installed library + # run: | + # cd test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Configure + # run: | + # mkdir __build__ && cd __build__ + # cmake -DBUILD_TESTING=ON .. + + # - name: Build tests + # run: | + # cd __build__ + # cmake --build . --target tests + + # - name: Run tests + # run: | + # cd __build__ + # ctest --output-on-failure --no-tests=error + + # cuda-linux: + # runs-on: ubuntu-20.04 + + # steps: + # - uses: actions/checkout@v4 + # - uses: Jimver/cuda-toolkit@v0.2.16 + # with: + # cuda: '11.7.1' + # linux-local-args: '["--toolkit"]' + + # - name: Setup Boost + # run: | + # cd .. + # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + # git clone --depth 1 https://github.com/boostorg/config + # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + # - name: Run Tests + # run: | + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp + + # cuda-windows: + # runs-on: windows-2019 + + # steps: + # - uses: actions/checkout@v4 + # - uses: Jimver/cuda-toolkit@v0.2.16 + # - uses: ilammy/msvc-dev-cmd@v1 + + # - name: Setup Boost + # run: | + # cd .. + # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + # git clone --depth 1 https://github.com/boostorg/config + # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + # - name: Run Tests + # shell: cmd + # run: | + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b + + # windows-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + # - os: windows-2022 + # install: ninja + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: choco install ${{matrix.install}} + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory (Debug) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake ${{ matrix.cmake-args }} .. + # cmake --build . --config Debug + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Use library with add_subdirectory (Release) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ + # cmake --build . --config Release + # ctest --output-on-failure --no-tests=error -C Release + + # windows-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # shell: cmd + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + + # - name: Install (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install --config Debug + + # - name: Install (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install --config Release + + # - name: Use the installed library (Debug) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + # cmake --build . --config Debug + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Use the installed library (Release) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ + # cmake --build . --config Release + # ctest --output-on-failure --no-tests=error -C Release + + # windows-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # shell: cmd + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. + + # - name: Build tests (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests --config Debug + + # - name: Run tests (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Build tests (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests --config Release + + # - name: Run tests (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error -C Release From 71cfe046bfb617691c7cfadacb6e895f5aa8d792 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:40:15 +0100 Subject: [PATCH 39/86] Install packages --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da717277..0bcec434 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,20 +302,20 @@ jobs: - os: ubuntu-24.04 container: ubuntu:24.10 cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build + install: ninja-build cmake clang-19 # - os: macos-13 # - os: macos-14 # - os: macos-15 runs-on: ${{matrix.os}} - container: ${{ matrix.container }} + container: ${{matrix.container}} steps: - uses: actions/checkout@v4 - name: Install packages if: matrix.install - run: sudo apt install ${{matrix.install}} + run: apt update && apt install -y ${{matrix.install}} - name: Setup Boost run: | From 27c0e8fb8f75239f6c7e1bd4a186be77027714db Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:44:52 +0100 Subject: [PATCH 40/86] Missing git and flags --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bcec434..eae1f32c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,13 +296,13 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 - os: ubuntu-24.04 container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git # - os: macos-13 # - os: macos-14 # - os: macos-15 @@ -315,7 +315,7 @@ jobs: - name: Install packages if: matrix.install - run: apt update && apt install -y ${{matrix.install}} + run: apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - name: Setup Boost run: | From ad34be9ed16598421dc6c59aa0ec0b041c19dc37 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:45:51 +0100 Subject: [PATCH 41/86] Missing ca-certificates --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eae1f32c..dca4f2a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,7 +302,7 @@ jobs: - os: ubuntu-24.04 container: ubuntu:24.10 cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates # - os: macos-13 # - os: macos-14 # - os: macos-15 From 3ec117b1112d0a6952a76a6b6c0554114e4b01b0 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:47:01 +0100 Subject: [PATCH 42/86] Missing python --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dca4f2a5..d0a956ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,7 +302,7 @@ jobs: - os: ubuntu-24.04 container: ubuntu:24.10 cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 # - os: macos-13 # - os: macos-14 # - os: macos-15 From 49813342d1b1b5aa951c8b484bbbbaa99205d030 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 18:55:01 +0100 Subject: [PATCH 43/86] Update remotes and install fixes --- .github/workflows/ci.yml | 4 ++-- tools/setup_boost_with_modules.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0a956ad..9f9258ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -301,7 +301,7 @@ jobs: # - os: ubuntu-24.04 - os: ubuntu-24.04 container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 # - os: macos-13 # - os: macos-14 @@ -315,7 +315,7 @@ jobs: - name: Install packages if: matrix.install - run: apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + run: DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - name: Setup Boost run: | diff --git a/tools/setup_boost_with_modules.py b/tools/setup_boost_with_modules.py index c1f39baa..41a5991c 100644 --- a/tools/setup_boost_with_modules.py +++ b/tools/setup_boost_with_modules.py @@ -10,8 +10,8 @@ def main(): submodules = [ ('tools/cmake', 'https://github.com/anarthal/boost-cmake', 'feature/cxx20-modules'), - ('libs/headers', 'https://github.com/anarthal/headers', 'feature/cxx20-modules'), - ('libs/config', 'https://github.com/anarthal/config', 'feature/cxx20-modules'), + ('libs/headers', 'https://github.com/boostorg/headers', 'develop'), + ('libs/config', 'https://github.com/boostorg/config', 'develop'), ('libs/assert', 'https://github.com/anarthal/assert', 'feature/cxx20-modules'), ('libs/core', 'https://github.com/anarthal/core', 'feature/cxx20-modules'), ('libs/throw_exception','https://github.com/anarthal/throw_exception','feature/cxx20-modules'), From 4dc9e3ef52658572e2f63306512e1637f9b2e140 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:12:39 +0100 Subject: [PATCH 44/86] Move away from boost_set_cxx20_module_settings --- CMakeLists.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b608c71..cf8173c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,16 +8,27 @@ project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX) if (BOOST_USE_MODULES) add_library(boost_mp11 STATIC) - boost_set_cxx20_module_settings(boost_mp11) target_sources(boost_mp11 PUBLIC FILE_SET CXX_MODULES BASE_DIRS modules FILES modules/boost_mp11.cppm) - target_include_directories(boost_mp11 PUBLIC include) + set(__scope PUBLIC) + + # Enable and propagate C++23, import std, and the modules macro + target_compile_features(boost_mp11 PUBLIC cxx_std_23) + set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) + target_compile_definitions(boost_mp11 PUBLIC BOOST_USE_MODULES) + + # Silence warnings about includes in the purview + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(boost_mp11 PRIVATE -Wno-include-angled-in-module-purview) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options(boost_mp11 PRIVATE /wd5244) + endif() else() add_library(boost_mp11 INTERFACE) - target_include_directories(boost_mp11 INTERFACE include) target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) endif() add_library(Boost::mp11 ALIAS boost_mp11) +target_include_directories(boost_mp11 ${__scope} include) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) From 965e5126c5fd168b0ff45bec6f66f28b21f87861 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:12:47 +0100 Subject: [PATCH 45/86] Missing export in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f9258ee..6853a6d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -315,7 +315,7 @@ jobs: - name: Install packages if: matrix.install - run: DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - name: Setup Boost run: | From 269a62170c7da899d4f866846e19704197d6f700 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:15:52 +0100 Subject: [PATCH 46/86] Guards for add_subdir/install tests --- test/cmake_install_test/main.cpp | 5 +++++ test/cmake_subdir_test/main.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/cmake_install_test/main.cpp b/test/cmake_install_test/main.cpp index 7b8689ac..0477ab29 100644 --- a/test/cmake_install_test/main.cpp +++ b/test/cmake_install_test/main.cpp @@ -2,7 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import boost.mp11; +#else #include +#endif + using namespace boost::mp11; int main() diff --git a/test/cmake_subdir_test/main.cpp b/test/cmake_subdir_test/main.cpp index 7b8689ac..0477ab29 100644 --- a/test/cmake_subdir_test/main.cpp +++ b/test/cmake_subdir_test/main.cpp @@ -2,7 +2,12 @@ // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +import boost.mp11; +#else #include +#endif + using namespace boost::mp11; int main() From 417c6dd1a842d795cef8b9cc1af547d927ad4f78 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:31:44 +0100 Subject: [PATCH 47/86] Increase max cmake version of tests --- test/cmake_install_test/CMakeLists.txt | 2 +- test/cmake_subdir_test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cmake_install_test/CMakeLists.txt b/test/cmake_install_test/CMakeLists.txt index e435ca7a..c9adea84 100644 --- a/test/cmake_install_test/CMakeLists.txt +++ b/test/cmake_install_test/CMakeLists.txt @@ -2,7 +2,7 @@ # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.5...3.16) +cmake_minimum_required(VERSION 3.5...3.31) project(cmake_install_test LANGUAGES CXX) diff --git a/test/cmake_subdir_test/CMakeLists.txt b/test/cmake_subdir_test/CMakeLists.txt index 09a02fc4..fcda3ece 100644 --- a/test/cmake_subdir_test/CMakeLists.txt +++ b/test/cmake_subdir_test/CMakeLists.txt @@ -2,7 +2,7 @@ # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.5...3.16) +cmake_minimum_required(VERSION 3.5...3.31) project(cmake_subdir_test LANGUAGES CXX) From 78d9ef25ec20b4d8ad6c12333f943b57f274bb52 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:38:45 +0100 Subject: [PATCH 48/86] Recover the other posix flows --- .github/workflows/ci.yml | 236 ++++++++++++++++++++------------------- 1 file changed, 120 insertions(+), 116 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6853a6d8..aaa40e63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -291,7 +291,60 @@ jobs: # cd ../boost-root # b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker - posix-cmake-subdir: + # posix-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # container: ubuntu:24.10 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + # container: ${{matrix.container}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake ${{ matrix.cmake-args }} .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + posix-cmake-install: strategy: fail-fast: false matrix: @@ -336,133 +389,84 @@ jobs: cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Use library with add_subdirectory + - name: Configure run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + cd ../boost-root mkdir __build__ && cd __build__ - cmake ${{ matrix.cmake-args }} .. - cmake --build . - ctest --output-on-failure --no-tests=error + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - # posix-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - - # - name: Install - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install + - name: Install + run: | + cd ../boost-root/__build__ + cmake --build . --target install - # - name: Use the installed library - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + - name: Use the installed library + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + cmake --build . + ctest --output-on-failure --no-tests=error - # posix-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 + posix-cmake-test: + strategy: + fail-fast: false + matrix: + include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + - os: ubuntu-24.04 + container: ubuntu:24.10 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 - # runs-on: ${{matrix.os}} + runs-on: ${{matrix.os}} + container: ${{matrix.container}} - # steps: - # - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} + - name: Install packages + if: matrix.install + run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. - # - name: Build tests - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests + - name: Build tests + run: | + cd ../boost-root/__build__ + cmake --build . --target tests - # - name: Run tests - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error + - name: Run tests + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error # standalone-cmake-subdir: # strategy: From efe931ba8ac611a2157f2951f8354ff2eefeff3c Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:46:30 +0100 Subject: [PATCH 49/86] Add Windows CMake add_subdirectory for modules --- .github/workflows/ci.yml | 265 +++++++++++++++++++++++---------------- 1 file changed, 155 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaa40e63..a03d754f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -344,129 +344,129 @@ jobs: # cmake --build . # ctest --output-on-failure --no-tests=error - posix-cmake-install: - strategy: - fail-fast: false - matrix: - include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - - os: ubuntu-24.04 - container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - runs-on: ${{matrix.os}} - container: ${{matrix.container}} + # posix-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # container: ubuntu:24.10 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 - steps: - - uses: actions/checkout@v4 + # runs-on: ${{matrix.os}} + # container: ${{matrix.container}} - - name: Install packages - if: matrix.install - run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + # steps: + # - uses: actions/checkout@v4 - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary + # - name: Install packages + # if: matrix.install + # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Install - run: | - cd ../boost-root/__build__ - cmake --build . --target install + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - - name: Use the installed library - run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - cmake --build . - ctest --output-on-failure --no-tests=error + # - name: Install + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install - posix-cmake-test: - strategy: - fail-fast: false - matrix: - include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - - os: ubuntu-24.04 - container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - runs-on: ${{matrix.os}} - container: ${{matrix.container}} + # - name: Use the installed library + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + # cmake --build . + # ctest --output-on-failure --no-tests=error - steps: - - uses: actions/checkout@v4 + # posix-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # container: ubuntu:24.10 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 - - name: Install packages - if: matrix.install - run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + # runs-on: ${{matrix.os}} + # container: ${{matrix.container}} - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + # steps: + # - uses: actions/checkout@v4 - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + # - name: Install packages + # if: matrix.install + # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - - name: Build tests - run: | - cd ../boost-root/__build__ - cmake --build . --target tests + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Run tests - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + + # - name: Build tests + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests + + # - name: Run tests + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error # standalone-cmake-subdir: # strategy: @@ -813,3 +813,48 @@ jobs: # run: | # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release + + windows-cmake-subdir-modules: + strategy: + fail-fast: false + matrix: + include: + - cmake-build-type: Debug + - cmake-build-type: Release + + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: choco install ninja + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Use library with add_subdirectory + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{cmake-build-type}} -G Ninja .. + cmake --build . + ctest --output-on-failure --no-tests=error From 2a2a64b120f83658601181621af2e814d5786136 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:49:03 +0100 Subject: [PATCH 50/86] Incorrect matrix reference --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a03d754f..233763dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -855,6 +855,6 @@ jobs: run: | cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ - cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{cmake-build-type}} -G Ninja .. + cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. cmake --build . ctest --output-on-failure --no-tests=error From 1369aa5e08be07b84a9802842c881eda1181e57a Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:50:41 +0100 Subject: [PATCH 51/86] Remove install packages condition --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 233763dc..6a91d3b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -828,7 +828,6 @@ jobs: - uses: actions/checkout@v4 - name: Install packages - if: matrix.install run: choco install ninja - name: Setup Boost From de4b6137a9292739bb7574f011c4211ac5f9f381 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:53:54 +0100 Subject: [PATCH 52/86] Add call to vcvarsall --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a91d3b6..b7a69e93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -852,6 +852,7 @@ jobs: - name: Use library with add_subdirectory shell: cmd run: | + "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. From 1ef600ddfd452b4197c2f63ab8f9029c24e84d96 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:56:01 +0100 Subject: [PATCH 53/86] add cmd /c --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7a69e93..17167aaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -852,7 +852,7 @@ jobs: - name: Use library with add_subdirectory shell: cmd run: | - "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cmd /c "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. From 8b557194fb9b6c31d26def60e397772f0b08cef9 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 19:57:42 +0100 Subject: [PATCH 54/86] Replace /c by /k --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17167aaa..1180af63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -852,7 +852,7 @@ jobs: - name: Use library with add_subdirectory shell: cmd run: | - cmd /c "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cmd /k "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. From a3daeccae506a59193798db55e015fec90c72580 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:01:13 +0100 Subject: [PATCH 55/86] Move cmd /k location --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1180af63..3109cb39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -828,7 +828,7 @@ jobs: - uses: actions/checkout@v4 - name: Install packages - run: choco install ninja + run: choco install --no-progress ninja - name: Setup Boost shell: cmd @@ -850,9 +850,8 @@ jobs: python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory - shell: cmd + shell: cmd /k "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 run: | - cmd /k "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. From d28ed4b71e00ef81f83565e3fb726188c8576fcd Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:04:48 +0100 Subject: [PATCH 56/86] Attempt with call --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3109cb39..6f08d542 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -850,8 +850,9 @@ jobs: python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory - shell: cmd /k "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. From 8b67df4aca217793511f1689692de10bb7694635 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:08:45 +0100 Subject: [PATCH 57/86] Windows install modules --- .github/workflows/ci.yml | 66 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f08d542..a900352b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -814,7 +814,52 @@ jobs: # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release - windows-cmake-subdir-modules: + # windows-cmake-subdir-modules: + # strategy: + # fail-fast: false + # matrix: + # include: + # - cmake-build-type: Debug + # - cmake-build-type: Release + + # runs-on: windows-2022 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # run: choco install --no-progress ninja + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + windows-cmake-install-modules: strategy: fail-fast: false matrix: @@ -849,12 +894,23 @@ jobs: xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Use library with add_subdirectory + - name: Configure shell: cmd run: | - call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + + - name: Install + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target install + + - name: Use the installed library + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. cmake --build . ctest --output-on-failure --no-tests=error From 05ead524af8f956f00908b6786ad00d34f7bb3ea Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:10:32 +0100 Subject: [PATCH 58/86] Missing vcvarsall calls --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a900352b..1d5f2480 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -897,6 +897,7 @@ jobs: - name: Configure shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root mkdir __build__ && cd __build__ cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. @@ -904,12 +905,14 @@ jobs: - name: Install shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/__build__ cmake --build . --target install - name: Use the installed library shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. cmake --build . From 38dfa0f4ffb3a466958570058bd8e297bd94bbf5 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:14:41 +0100 Subject: [PATCH 59/86] Run tests Windows --- .github/workflows/ci.yml | 73 +++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d5f2480..b5cce28b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -859,7 +859,66 @@ jobs: # cmake --build . # ctest --output-on-failure --no-tests=error - windows-cmake-install-modules: + # windows-cmake-install-modules: + # strategy: + # fail-fast: false + # matrix: + # include: + # - cmake-build-type: Debug + # - cmake-build-type: Release + + # runs-on: windows-2022 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # run: choco install --no-progress ninja + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + + # - name: Install + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root/__build__ + # cmake --build . --target install + + # - name: Use the installed library + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + windows-cmake-test-modules: strategy: fail-fast: false matrix: @@ -900,20 +959,18 @@ jobs: call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. - - name: Install + - name: Build tests shell: cmd run: | call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root/__build__ - cmake --build . --target install + cmake --build . --target tests - - name: Use the installed library + - name: Run tests shell: cmd run: | call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - cmake --build . + cd ../boost-root/__build__ ctest --output-on-failure --no-tests=error From 63dce8fa07eb712e9188ca7b4b8c9b38340cdabc Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:19:08 +0100 Subject: [PATCH 60/86] Missing cmake args --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5cce28b..53cc1ad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -959,7 +959,7 @@ jobs: call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - name: Build tests shell: cmd From fd36f27a7aae717d6d726d36246932b25c2f9bf7 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:22:10 +0100 Subject: [PATCH 61/86] Missing __scope in header-only build --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf8173c6..ddedc5c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ if (BOOST_USE_MODULES) else() add_library(boost_mp11 INTERFACE) target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) + set(__scope INTERFACE) endif() add_library(Boost::mp11 ALIAS boost_mp11) From 442ee2d64d7a8ecea280f002211298defbf0b747 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:23:10 +0100 Subject: [PATCH 62/86] Missing -DBOOST_USE_MODULES=1 --- .github/workflows/ci.yml | 55 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53cc1ad0..c54ba466 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -814,6 +814,59 @@ jobs: # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release + # posix-cmake-subdir-modules: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: ubuntu-24.04 + # container: ubuntu:24.10 + # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + # container: ${{matrix.container}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake ${{ matrix.cmake-args }} .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + # windows-cmake-subdir-modules: # strategy: # fail-fast: false @@ -959,7 +1012,7 @@ jobs: call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - name: Build tests shell: cmd From 478901da7d4caded36660015f5734523885ddce5 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:27:53 +0100 Subject: [PATCH 63/86] Separate Posix add_subdirectory workflow --- .github/workflows/ci.yml | 187 +++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 96 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c54ba466..30759050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -814,58 +814,53 @@ jobs: # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release - # posix-cmake-subdir-modules: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # container: ubuntu:24.10 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 + posix-cmake-subdir-modules: + strategy: + fail-fast: false + matrix: + include: + - cmake-build-type: Debug + - cmake-build-type: Release - # runs-on: ${{matrix.os}} - # container: ${{matrix.container}} + runs-on: ubuntu-latest + container: ubuntu:24.10 - # steps: - # - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - # - name: Install packages - # if: matrix.install - # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + - name: Install packages + run: | + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ + clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # - name: Use library with add_subdirectory - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake ${{ matrix.cmake-args }} .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + - name: Use library with add_subdirectory + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + cmake --build . + ctest --output-on-failure --no-tests=error # windows-cmake-subdir-modules: # strategy: @@ -971,59 +966,59 @@ jobs: # cmake --build . # ctest --output-on-failure --no-tests=error - windows-cmake-test-modules: - strategy: - fail-fast: false - matrix: - include: - - cmake-build-type: Debug - - cmake-build-type: Release + # windows-cmake-test-modules: + # strategy: + # fail-fast: false + # matrix: + # include: + # - cmake-build-type: Debug + # - cmake-build-type: Release - runs-on: windows-2022 + # runs-on: windows-2022 - steps: - - uses: actions/checkout@v4 + # steps: + # - uses: actions/checkout@v4 - - name: Install packages - run: choco install --no-progress ninja + # - name: Install packages + # run: choco install --no-progress ninja - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - python libs/mp11/tools/setup_boost_with_modules.py # Temporary + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Configure - shell: cmd - run: | - call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + # - name: Configure + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - - name: Build tests - shell: cmd - run: | - call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - cd ../boost-root/__build__ - cmake --build . --target tests + # - name: Build tests + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root/__build__ + # cmake --build . --target tests - - name: Run tests - shell: cmd - run: | - call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error + # - name: Run tests + # shell: cmd + # run: | + # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error From 38f54bc5e59e0773a8f69e728b86edcb7d9b2ac7 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:32:28 +0100 Subject: [PATCH 64/86] Install workflow for modules in posix --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30759050..455754f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -814,13 +814,57 @@ jobs: # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release - posix-cmake-subdir-modules: - strategy: - fail-fast: false - matrix: - include: - - cmake-build-type: Debug - - cmake-build-type: Release + # posix-cmake-subdir-modules: + # strategy: + # fail-fast: false + # matrix: + # include: + # - cmake-build-type: Debug + # - cmake-build-type: Release + + # runs-on: ubuntu-latest + # container: ubuntu:24.10 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # run: | + # export DEBIAN_FRONTEND=noninteractive + # apt-get update + # apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ + # clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + posix-cmake-install-modules: + env: + CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja runs-on: ubuntu-latest container: ubuntu:24.10 @@ -854,11 +898,21 @@ jobs: cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - name: Use library with add_subdirectory + - name: Configure run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. + + - name: Install + run: | + cd ../boost-root/__build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local $CMAKE_ARGS .. cmake --build . ctest --output-on-failure --no-tests=error From e9505796c4930a91790a4f0305e415807d57cfbe Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:37:22 +0100 Subject: [PATCH 65/86] Posix cmake test with modules --- .github/workflows/ci.yml | 76 +++++++++++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 455754f1..d0aa045b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -862,9 +862,69 @@ jobs: # cmake --build . # ctest --output-on-failure --no-tests=error - posix-cmake-install-modules: + # posix-cmake-install-modules: + # env: + # CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + + # runs-on: ubuntu-latest + # container: ubuntu:24.10 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # run: | + # export DEBIAN_FRONTEND=noninteractive + # apt-get update + # apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ + # clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. + + # - name: Install + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install + + # - name: Use the installed library + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local $CMAKE_ARGS .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + posix-cmake-test-modules: env: CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + strategy: + fail-fast: false + matrix: + include: + - cmake-build-type: Debug + - cmake-build-type: Release runs-on: ubuntu-latest container: ubuntu:24.10 @@ -896,24 +956,22 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} $CMAKE_ARGS .. - - name: Install + - name: Build tests run: | cd ../boost-root/__build__ - cmake --build . --target install + cmake --build . --target tests - - name: Use the installed library + - name: Run tests run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local $CMAKE_ARGS .. - cmake --build . + cd ../boost-root/__build__ ctest --output-on-failure --no-tests=error # windows-cmake-subdir-modules: From 037fc1cea74843158a445bbdea835648b00ed8e2 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:37:44 +0100 Subject: [PATCH 66/86] Missing BOOST_USE_MODULES --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0aa045b..76ab5722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -962,7 +962,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} $CMAKE_ARGS .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. - name: Build tests run: | From 89b60661d244d6947ea456e505443cf6fc6c5bd2 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:43:36 +0100 Subject: [PATCH 67/86] Cleanup and recover all module builds --- .github/workflows/ci.yml | 455 +++++++++++++++++++-------------------- 1 file changed, 216 insertions(+), 239 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ab5722..c9e56263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -814,111 +814,102 @@ jobs: # cd ../boost-root/__build__ # ctest --output-on-failure --no-tests=error -C Release - # posix-cmake-subdir-modules: - # strategy: - # fail-fast: false - # matrix: - # include: - # - cmake-build-type: Debug - # - cmake-build-type: Release + posix-cmake-subdir-modules: + runs-on: ubuntu-latest + container: ubuntu:24.10 - # runs-on: ubuntu-latest - # container: ubuntu:24.10 + steps: + - uses: actions/checkout@v4 - # steps: - # - uses: actions/checkout@v4 + - name: Install packages + run: | + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ + clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 - # - name: Install packages - # run: | - # export DEBIAN_FRONTEND=noninteractive - # apt-get update - # apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ - # clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Use library with add_subdirectory + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + cmake --build . + ctest --output-on-failure --no-tests=error - # - name: Use library with add_subdirectory - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + posix-cmake-install-modules: + env: + CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # posix-cmake-install-modules: - # env: - # CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - - # runs-on: ubuntu-latest - # container: ubuntu:24.10 - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # run: | - # export DEBIAN_FRONTEND=noninteractive - # apt-get update - # apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ - # clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. - - # - name: Install - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install - - # - name: Use the installed library - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local $CMAKE_ARGS .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + runs-on: ubuntu-latest + container: ubuntu:24.10 + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + run: | + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends ninja-build cmake git ca-certificates python3 python-is-python3 \ + clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. + + - name: Install + run: | + cd ../boost-root/__build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local $CMAKE_ARGS .. + cmake --build . + ctest --output-on-failure --no-tests=error posix-cmake-test-modules: - env: - CMAKE_ARGS: -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja strategy: fail-fast: false matrix: @@ -962,7 +953,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -DBOOST_USE_MODULES=1 $CMAKE_ARGS .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. - name: Build tests run: | @@ -974,163 +965,149 @@ jobs: cd ../boost-root/__build__ ctest --output-on-failure --no-tests=error - # windows-cmake-subdir-modules: - # strategy: - # fail-fast: false - # matrix: - # include: - # - cmake-build-type: Debug - # - cmake-build-type: Release + windows-cmake-subdir-modules: + runs-on: windows-2022 - # runs-on: windows-2022 - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # run: choco install --no-progress ninja + steps: + - uses: actions/checkout@v4 - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Install packages + run: choco install --no-progress ninja - # - name: Use library with add_subdirectory - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # windows-cmake-install-modules: - # strategy: - # fail-fast: false - # matrix: - # include: - # - cmake-build-type: Debug - # - cmake-build-type: Release + - name: Use library with add_subdirectory + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + cmake --build . + ctest --output-on-failure --no-tests=error - # runs-on: windows-2022 + windows-cmake-install-modules: + runs-on: windows-2022 - # steps: - # - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - # - name: Install packages - # run: choco install --no-progress ninja + - name: Install packages + run: choco install --no-progress ninja - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # - name: Configure - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + - name: Configure + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. - # - name: Install - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root/__build__ - # cmake --build . --target install + - name: Install + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root/__build__ + cmake --build . --target install - # - name: Use the installed library - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - # cmake --build . - # ctest --output-on-failure --no-tests=error + - name: Use the installed library + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja .. + cmake --build . + ctest --output-on-failure --no-tests=error - # windows-cmake-test-modules: - # strategy: - # fail-fast: false - # matrix: - # include: - # - cmake-build-type: Debug - # - cmake-build-type: Release + windows-cmake-test-modules: + strategy: + fail-fast: false + matrix: + include: + - cmake-build-type: Debug + - cmake-build-type: Release - # runs-on: windows-2022 + runs-on: windows-2022 - # steps: - # - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - # - name: Install packages - # run: choco install --no-progress ninja + - name: Install packages + run: choco install --no-progress ninja - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # - name: Configure - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. + - name: Configure + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -DCMAKE_BUILD_TYPE=${{matrix.cmake-build-type}} -G Ninja .. - # - name: Build tests - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root/__build__ - # cmake --build . --target tests + - name: Build tests + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root/__build__ + cmake --build . --target tests - # - name: Run tests - # shell: cmd - # run: | - # call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error + - name: Run tests + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64 + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error From 413faaedb7fac3163e6256e4e96e315dd6a44b27 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:44:54 +0100 Subject: [PATCH 68/86] Recover the other builds --- .github/workflows/ci.yml | 1602 +++++++++++++++++++------------------- 1 file changed, 801 insertions(+), 801 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9e56263..9d555213 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,807 +12,807 @@ env: UBSAN_OPTIONS: print_stacktrace=1 jobs: - # posix: - # strategy: - # fail-fast: false - # matrix: - # include: - # - toolset: gcc-4.8 - # cxxstd: "03,11" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-4.8 - # - toolset: gcc-4.9 - # cxxstd: "03,11" - # container: ubuntu:16.04 - # os: ubuntu-latest - # install: g++-4.9 - # - toolset: gcc-5 - # cxxstd: "03,11,14,1z" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-5 - # - toolset: gcc-6 - # cxxstd: "03,11,14,1z" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-6 - # - toolset: gcc-7 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: g++-7 - # - toolset: gcc-8 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # install: g++-8 - # - toolset: gcc-9 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: gcc-10 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-22.04 - # install: g++-10 - # - toolset: gcc-11 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-22.04 - # - toolset: gcc-12 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-22.04 - # install: g++-12 - # - toolset: gcc-13 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-latest - # container: ubuntu:24.04 - # install: g++-13 - # - toolset: gcc-14 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-latest - # container: ubuntu:24.04 - # install: g++-14 - # - toolset: clang - # compiler: clang++-3.9 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-3.9 - # - toolset: clang - # compiler: clang++-4.0 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-4.0 - # - toolset: clang - # compiler: clang++-5.0 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-5.0 - # - toolset: clang - # compiler: clang++-6.0 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-6.0 - # - toolset: clang - # compiler: clang++-7 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-7 - # - toolset: clang - # compiler: clang++-8 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-8 - # - toolset: clang - # compiler: clang++-9 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # install: clang-9 - # - toolset: clang - # compiler: clang++-10 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-11 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-12 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-13 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-13 - # - toolset: clang - # compiler: clang++-14 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-14 - # - toolset: clang - # compiler: clang++-15 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-15 - # - toolset: clang - # compiler: clang++-16 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-16 - # - toolset: clang - # compiler: clang++-17 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-17 - # - toolset: clang - # compiler: clang++-18 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-18 - # - toolset: clang - # compiler: clang++-19 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.10 - # os: ubuntu-latest - # install: clang-19 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-13 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-14 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-15 - - # runs-on: ${{matrix.os}} - - # container: - # image: ${{matrix.container}} - # volumes: - # - /node20217:/node20217:rw,rshared - # - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} - - # defaults: - # run: - # shell: bash - - # steps: - # - name: Setup container environment - # if: matrix.container - # run: | - # apt-get update - # apt-get -y install sudo python3 git g++ curl xz-utils - - # - name: Install nodejs20glibc2.17 - # if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} - # run: | - # curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz - # tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - # ldd /__e/node20/bin/node - - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: | - # sudo apt-get update - # sudo apt-get -y install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - # ./bootstrap.sh - # ./b2 -d0 headers - - # - name: Create user-config.jam - # if: matrix.compiler - # run: | - # echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - - # - name: Run tests - # run: | - # cd ../boost-root - # ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release - - # windows: - # strategy: - # fail-fast: false - # matrix: - # include: - # # msvc-14.0 not included, because it fails with "compiler is out of heap space" - # - toolset: msvc-14.2 - # cxxstd: "14,17,20,latest" - # addrmd: 32,64 - # os: windows-2019 - # - toolset: msvc-14.3 - # cxxstd: "14,17,20,latest" - # addrmd: 32,64 - # os: windows-2022 - # - toolset: clang-win - # cxxstd: "14,17,latest" - # addrmd: 32,64 - # os: windows-2022 - # - toolset: gcc - # cxxstd: "03,11,14,17,2a" - # addrmd: 64 - # os: windows-2019 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # cmd /c bootstrap - # b2 -d0 headers - - # - name: Run tests - # shell: cmd - # run: | - # cd ../boost-root - # b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker - - # posix-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # container: ubuntu:24.10 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - # container: ${{matrix.container}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Use library with add_subdirectory - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake ${{ matrix.cmake-args }} .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # posix-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # container: ubuntu:24.10 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - # container: ${{matrix.container}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - - # - name: Install - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install - - # - name: Use the installed library - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # posix-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: ubuntu-24.04 - # container: ubuntu:24.10 - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - # install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - # container: ${{matrix.container}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. - - # - name: Build tests - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests - - # - name: Run tests - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Use library with add_subdirectory - # run: | - # cd test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Configure - # run: | - # mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - - # - name: Install - # run: | - # cd __build__ - # cmake --build . --target install - - # - name: Use the installed library - # run: | - # cd test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Configure - # run: | - # mkdir __build__ && cd __build__ - # cmake -DBUILD_TESTING=ON .. - - # - name: Build tests - # run: | - # cd __build__ - # cmake --build . --target tests - - # - name: Run tests - # run: | - # cd __build__ - # ctest --output-on-failure --no-tests=error - - # cuda-linux: - # runs-on: ubuntu-20.04 - - # steps: - # - uses: actions/checkout@v4 - # - uses: Jimver/cuda-toolkit@v0.2.16 - # with: - # cuda: '11.7.1' - # linux-local-args: '["--toolkit"]' - - # - name: Setup Boost - # run: | - # cd .. - # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - # git clone --depth 1 https://github.com/boostorg/config - # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - # - name: Run Tests - # run: | - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp - - # cuda-windows: - # runs-on: windows-2019 - - # steps: - # - uses: actions/checkout@v4 - # - uses: Jimver/cuda-toolkit@v0.2.16 - # - uses: ilammy/msvc-dev-cmd@v1 - - # - name: Setup Boost - # run: | - # cd .. - # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - # git clone --depth 1 https://github.com/boostorg/config - # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - # - name: Run Tests - # shell: cmd - # run: | - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b - - # windows-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - # - os: windows-2022 - # install: ninja - # cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: choco install ${{matrix.install}} - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Use library with add_subdirectory (Debug) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake ${{ matrix.cmake-args }} .. - # cmake --build . --config Debug - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Use library with add_subdirectory (Release) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ - # cmake --build . --config Release - # ctest --output-on-failure --no-tests=error -C Release - - # windows-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # shell: cmd - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - - # - name: Install (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install --config Debug - - # - name: Install (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install --config Release - - # - name: Use the installed library (Debug) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - # cmake --build . --config Debug - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Use the installed library (Release) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ - # cmake --build . --config Release - # ctest --output-on-failure --no-tests=error -C Release - - # windows-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # shell: cmd - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. - - # - name: Build tests (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests --config Debug - - # - name: Run tests (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Build tests (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests --config Release - - # - name: Run tests (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error -C Release + posix: + strategy: + fail-fast: false + matrix: + include: + - toolset: gcc-4.8 + cxxstd: "03,11" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-4.8 + - toolset: gcc-4.9 + cxxstd: "03,11" + container: ubuntu:16.04 + os: ubuntu-latest + install: g++-4.9 + - toolset: gcc-5 + cxxstd: "03,11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-5 + - toolset: gcc-6 + cxxstd: "03,11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-6 + - toolset: gcc-7 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: g++-7 + - toolset: gcc-8 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + install: g++-8 + - toolset: gcc-9 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: gcc-10 + cxxstd: "03,11,14,17,2a" + os: ubuntu-22.04 + install: g++-10 + - toolset: gcc-11 + cxxstd: "03,11,14,17,2a" + os: ubuntu-22.04 + - toolset: gcc-12 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-22.04 + install: g++-12 + - toolset: gcc-13 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-13 + - toolset: gcc-14 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-14 + - toolset: clang + compiler: clang++-3.9 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-3.9 + - toolset: clang + compiler: clang++-4.0 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-4.0 + - toolset: clang + compiler: clang++-5.0 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-5.0 + - toolset: clang + compiler: clang++-6.0 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-6.0 + - toolset: clang + compiler: clang++-7 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-7 + - toolset: clang + compiler: clang++-8 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-8 + - toolset: clang + compiler: clang++-9 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + install: clang-9 + - toolset: clang + compiler: clang++-10 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-11 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-12 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-13 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-13 + - toolset: clang + compiler: clang++-14 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-14 + - toolset: clang + compiler: clang++-15 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-15 + - toolset: clang + compiler: clang++-16 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-16 + - toolset: clang + compiler: clang++-17 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-17 + - toolset: clang + compiler: clang++-18 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-18 + - toolset: clang + compiler: clang++-19 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.10 + os: ubuntu-latest + install: clang-19 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-13 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-14 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-15 + + runs-on: ${{matrix.os}} + + container: + image: ${{matrix.container}} + volumes: + - /node20217:/node20217:rw,rshared + - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + + defaults: + run: + shell: bash + + steps: + - name: Setup container environment + if: matrix.container + run: | + apt-get update + apt-get -y install sudo python3 git g++ curl xz-utils + + - name: Install nodejs20glibc2.17 + if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} + run: | + curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz + tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + ldd /__e/node20/bin/node + + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: | + sudo apt-get update + sudo apt-get -y install ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + ./bootstrap.sh + ./b2 -d0 headers + + - name: Create user-config.jam + if: matrix.compiler + run: | + echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + + - name: Run tests + run: | + cd ../boost-root + ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release + + windows: + strategy: + fail-fast: false + matrix: + include: + # msvc-14.0 not included, because it fails with "compiler is out of heap space" + - toolset: msvc-14.2 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2019 + - toolset: msvc-14.3 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: clang-win + cxxstd: "14,17,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: gcc + cxxstd: "03,11,14,17,2a" + addrmd: 64 + os: windows-2019 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + cmd /c bootstrap + b2 -d0 headers + + - name: Run tests + shell: cmd + run: | + cd ../boost-root + b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + + posix-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: ubuntu-24.04 + container: ubuntu:24.10 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + container: ${{matrix.container}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Use library with add_subdirectory + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake ${{ matrix.cmake-args }} .. + cmake --build . + ctest --output-on-failure --no-tests=error + + posix-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: ubuntu-24.04 + container: ubuntu:24.10 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + container: ${{matrix.container}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + + - name: Install + run: | + cd ../boost-root/__build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + cmake --build . + ctest --output-on-failure --no-tests=error + + posix-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: ubuntu-24.04 + container: ubuntu:24.10 + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + container: ${{matrix.container}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + + - name: Build tests + run: | + cd ../boost-root/__build__ + cmake --build . --target tests + + - name: Run tests + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error + + standalone-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Use library with add_subdirectory + run: | + cd test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake .. + cmake --build . + ctest --output-on-failure --no-tests=error + + standalone-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Configure + run: | + mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + + - name: Install + run: | + cd __build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + cmake --build . + ctest --output-on-failure --no-tests=error + + standalone-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Configure + run: | + mkdir __build__ && cd __build__ + cmake -DBUILD_TESTING=ON .. + + - name: Build tests + run: | + cd __build__ + cmake --build . --target tests + + - name: Run tests + run: | + cd __build__ + ctest --output-on-failure --no-tests=error + + cuda-linux: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + - uses: Jimver/cuda-toolkit@v0.2.16 + with: + cuda: '11.7.1' + linux-local-args: '["--toolkit"]' + + - name: Setup Boost + run: | + cd .. + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + git clone --depth 1 https://github.com/boostorg/config + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + - name: Run Tests + run: | + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp + + cuda-windows: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v4 + - uses: Jimver/cuda-toolkit@v0.2.16 + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Setup Boost + run: | + cd .. + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + git clone --depth 1 https://github.com/boostorg/config + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + - name: Run Tests + shell: cmd + run: | + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b + + windows-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + - os: windows-2022 + install: ninja + cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: choco install ${{matrix.install}} + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Use library with add_subdirectory (Debug) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake ${{ matrix.cmake-args }} .. + cmake --build . --config Debug + ctest --output-on-failure --no-tests=error -C Debug + + - name: Use library with add_subdirectory (Release) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ + cmake --build . --config Release + ctest --output-on-failure --no-tests=error -C Release + + windows-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + shell: cmd + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + + - name: Install (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target install --config Debug + + - name: Install (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target install --config Release + + - name: Use the installed library (Debug) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + cmake --build . --config Debug + ctest --output-on-failure --no-tests=error -C Debug + + - name: Use the installed library (Release) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ + cmake --build . --config Release + ctest --output-on-failure --no-tests=error -C Release + + windows-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + shell: cmd + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. + + - name: Build tests (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target tests --config Debug + + - name: Run tests (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error -C Debug + + - name: Build tests (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target tests --config Release + + - name: Run tests (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error -C Release posix-cmake-subdir-modules: runs-on: ubuntu-latest From 0b2f029685bb04f1c86e6c4a7d261fc833850b65 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:49:58 +0100 Subject: [PATCH 69/86] Cleanup existing workflows --- .github/workflows/ci.yml | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d555213..8db47177 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,23 +299,18 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 - - os: ubuntu-24.04 - container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - os: macos-13 - os: macos-14 - os: macos-15 runs-on: ${{matrix.os}} - container: ${{matrix.container}} steps: - uses: actions/checkout@v4 - name: Install packages if: matrix.install - run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + run: sudo apt install ${{matrix.install}} - name: Setup Boost run: | @@ -340,7 +335,7 @@ jobs: run: | cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test mkdir __build__ && cd __build__ - cmake ${{ matrix.cmake-args }} .. + cmake .. cmake --build . ctest --output-on-failure --no-tests=error @@ -352,23 +347,18 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 - - os: ubuntu-24.04 - container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - os: macos-13 - os: macos-14 - os: macos-15 runs-on: ${{matrix.os}} - container: ${{matrix.container}} steps: - uses: actions/checkout@v4 - name: Install packages if: matrix.install - run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + run: sudo apt install ${{matrix.install}} - name: Setup Boost run: | @@ -393,7 +383,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. - name: Install run: | @@ -403,7 +393,7 @@ jobs: - name: Use the installed library run: | cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local ${{ matrix.cmake-args }} .. + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. cmake --build . ctest --output-on-failure --no-tests=error @@ -415,23 +405,18 @@ jobs: - os: ubuntu-20.04 - os: ubuntu-22.04 - os: ubuntu-24.04 - - os: ubuntu-24.04 - container: ubuntu:24.10 - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja - install: ninja-build cmake clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 git ca-certificates python3 python-is-python3 - os: macos-13 - os: macos-14 - os: macos-15 runs-on: ${{matrix.os}} - container: ${{matrix.container}} steps: - uses: actions/checkout@v4 - name: Install packages if: matrix.install - run: export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends ${{matrix.install}} + run: sudo apt install ${{matrix.install}} - name: Setup Boost run: | @@ -456,7 +441,7 @@ jobs: run: | cd ../boost-root mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ${{ matrix.cmake-args }} .. + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. - name: Build tests run: | @@ -637,19 +622,12 @@ jobs: include: - os: windows-2019 - os: windows-2022 - - os: windows-2022 - install: ninja - cmake-args: -DBOOST_USE_MODULES=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 - - name: Install packages - if: matrix.install - run: choco install ${{matrix.install}} - - name: Setup Boost shell: cmd run: | @@ -674,7 +652,7 @@ jobs: run: | cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test mkdir __build__ && cd __build__ - cmake ${{ matrix.cmake-args }} .. + cmake .. cmake --build . --config Debug ctest --output-on-failure --no-tests=error -C Debug From 810f2925c86f6c9f2f9120a0fedcc70b2cd42b39 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 20:56:22 +0100 Subject: [PATCH 70/86] Missing clone of Boost.Build --- tools/setup_boost_with_modules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/setup_boost_with_modules.py b/tools/setup_boost_with_modules.py index 41a5991c..d8f0f21e 100644 --- a/tools/setup_boost_with_modules.py +++ b/tools/setup_boost_with_modules.py @@ -10,6 +10,7 @@ def main(): submodules = [ ('tools/cmake', 'https://github.com/anarthal/boost-cmake', 'feature/cxx20-modules'), + ('tools/build', 'https://github.com/boostorg/build', 'develop'), ('libs/headers', 'https://github.com/boostorg/headers', 'develop'), ('libs/config', 'https://github.com/boostorg/config', 'develop'), ('libs/assert', 'https://github.com/anarthal/assert', 'feature/cxx20-modules'), From 3f98b3b3f55077c0088431f298bbacbd20fef335 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 6 Jan 2025 21:09:27 +0100 Subject: [PATCH 71/86] Missing boost_install --- tools/setup_boost_with_modules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/setup_boost_with_modules.py b/tools/setup_boost_with_modules.py index d8f0f21e..bca18814 100644 --- a/tools/setup_boost_with_modules.py +++ b/tools/setup_boost_with_modules.py @@ -11,6 +11,7 @@ def main(): submodules = [ ('tools/cmake', 'https://github.com/anarthal/boost-cmake', 'feature/cxx20-modules'), ('tools/build', 'https://github.com/boostorg/build', 'develop'), + ('tools/build_install', 'https://github.com/boostorg/build_install', 'develop'), ('libs/headers', 'https://github.com/boostorg/headers', 'develop'), ('libs/config', 'https://github.com/boostorg/config', 'develop'), ('libs/assert', 'https://github.com/anarthal/assert', 'feature/cxx20-modules'), From d05eaaf0e6df826bf2db2884b6e577101ea45888 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 7 Jan 2025 20:58:19 +0100 Subject: [PATCH 72/86] Recover depinst --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8db47177..a2c6fd04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -222,6 +222,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python3 tools/boostdep/depinst/depinst.py $LIBRARY python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary ./bootstrap.sh ./b2 -d0 headers @@ -281,6 +283,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary cmd /c bootstrap b2 -d0 headers @@ -329,6 +333,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory @@ -377,6 +383,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -435,7 +443,9 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure run: | @@ -645,6 +655,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory (Debug) @@ -693,6 +705,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -759,6 +773,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -823,6 +839,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py $LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory @@ -867,6 +885,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py $LIBRARY python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -925,6 +945,8 @@ jobs: git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python3 tools/boostdep/depinst/depinst.py $LIBRARY python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -969,6 +991,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Use library with add_subdirectory @@ -1007,6 +1031,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure @@ -1066,6 +1092,8 @@ jobs: git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% python libs/mp11/tools/setup_boost_with_modules.py # Temporary - name: Configure From 2aff61089f49ab441a7cddfe7fb5e71c40381f0a Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 7 Jan 2025 21:05:37 +0100 Subject: [PATCH 73/86] Update setup script --- tools/setup_boost_with_modules.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/setup_boost_with_modules.py b/tools/setup_boost_with_modules.py index bca18814..443583b1 100644 --- a/tools/setup_boost_with_modules.py +++ b/tools/setup_boost_with_modules.py @@ -5,23 +5,24 @@ # Call it instead of depinst from subprocess import run +import os def main(): submodules = [ - ('tools/cmake', 'https://github.com/anarthal/boost-cmake', 'feature/cxx20-modules'), - ('tools/build', 'https://github.com/boostorg/build', 'develop'), - ('tools/build_install', 'https://github.com/boostorg/build_install', 'develop'), - ('libs/headers', 'https://github.com/boostorg/headers', 'develop'), - ('libs/config', 'https://github.com/boostorg/config', 'develop'), - ('libs/assert', 'https://github.com/anarthal/assert', 'feature/cxx20-modules'), - ('libs/core', 'https://github.com/anarthal/core', 'feature/cxx20-modules'), - ('libs/throw_exception','https://github.com/anarthal/throw_exception','feature/cxx20-modules'), - ('libs/static_assert', 'https://github.com/boostorg/static_assert', 'develop'), + ('tools/cmake', 'https://github.com/anarthal/boost-cmake'), + ('libs/assert', 'https://github.com/anarthal/assert'), + ('libs/core', 'https://github.com/anarthal/core'), + ('libs/throw_exception','https://github.com/anarthal/throw_exception'), ] - for submodule, url, branch in submodules: - run(["git", "clone", url, "--depth", "1", "-b", branch, submodule]) + for submodule, url in submodules: + os.chdir(submodule) + run(['git', 'remote', 'add', 'modules', url]) + run(['git', 'fetch', '--depth', '1', 'modules', 'feature/cxx20-modules']) + run(['git', 'checkout', 'modules/feature/cxx20-modules']) + os.chdir('../..') + if __name__ == '__main__': main() From 87fd4981478706d3408f91d5eaa661185ffdad76 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 7 Jan 2025 21:37:58 +0100 Subject: [PATCH 74/86] Experiment with export using --- CMakeLists.txt | 7 - include/boost/mp11/algorithm.hpp | 150 ++++++----- include/boost/mp11/bind.hpp | 34 +-- include/boost/mp11/detail/config.hpp | 8 - include/boost/mp11/detail/mp_append.hpp | 2 +- include/boost/mp11/detail/mp_copy_if.hpp | 4 +- include/boost/mp11/detail/mp_count.hpp | 6 +- include/boost/mp11/detail/mp_defer.hpp | 10 +- include/boost/mp11/detail/mp_fold.hpp | 4 +- include/boost/mp11/detail/mp_front.hpp | 2 +- include/boost/mp11/detail/mp_is_list.hpp | 2 +- .../boost/mp11/detail/mp_is_value_list.hpp | 2 +- include/boost/mp11/detail/mp_list.hpp | 1 - include/boost/mp11/detail/mp_list_v.hpp | 1 - include/boost/mp11/detail/mp_map_find.hpp | 2 +- include/boost/mp11/detail/mp_min_element.hpp | 8 +- include/boost/mp11/detail/mp_plus.hpp | 2 +- include/boost/mp11/detail/mp_remove_if.hpp | 4 +- include/boost/mp11/detail/mp_rename.hpp | 6 +- include/boost/mp11/detail/mp_value.hpp | 2 +- include/boost/mp11/detail/mp_void.hpp | 2 +- include/boost/mp11/detail/mp_with_index.hpp | 4 +- include/boost/mp11/function.hpp | 18 +- include/boost/mp11/integer_sequence.hpp | 12 +- include/boost/mp11/integral.hpp | 14 +- include/boost/mp11/lambda.hpp | 2 +- include/boost/mp11/list.hpp | 25 -- include/boost/mp11/map.hpp | 16 +- include/boost/mp11/set.hpp | 14 +- include/boost/mp11/tuple.hpp | 5 - include/boost/mp11/utility.hpp | 31 +-- modules/boost_mp11.cppm | 242 +++++++++++++++++- 32 files changed, 411 insertions(+), 231 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddedc5c5..e08100c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,13 +15,6 @@ if (BOOST_USE_MODULES) target_compile_features(boost_mp11 PUBLIC cxx_std_23) set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) target_compile_definitions(boost_mp11 PUBLIC BOOST_USE_MODULES) - - # Silence warnings about includes in the purview - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(boost_mp11 PRIVATE -Wno-include-angled-in-module-purview) - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(boost_mp11 PRIVATE /wd5244) - endif() else() add_library(boost_mp11 INTERFACE) target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index e9b25cc6..1860a971 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -144,13 +144,13 @@ template class F, class... L> using mp_transform = typename d #else -BOOST_MP11_MODULE_EXPORT template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; +template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; #endif #endif -BOOST_MP11_MODULE_EXPORT template using mp_transform_q = mp_transform; +template using mp_transform_q = mp_transform; namespace detail { @@ -197,8 +197,8 @@ template class P, template class F, class... L> str } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; +template class P, template class F, class... L> using mp_transform_if = typename detail::mp_transform_if_impl::type; +template using mp_transform_if_q = typename detail::mp_transform_if_impl::type; // mp_filter namespace detail @@ -218,8 +218,8 @@ template class P, class L1, class... L> struct mp_filter_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_filter_q = typename detail::mp_filter_impl::type; +template class P, class... L> using mp_filter = typename detail::mp_filter_impl::type; +template using mp_filter_q = typename detail::mp_filter_impl::type; // mp_fill namespace detail @@ -256,10 +256,10 @@ template class L, auto... A, class V> struct mp_fill_impl using mp_fill = typename detail::mp_fill_impl::type; +template using mp_fill = typename detail::mp_fill_impl::type; // mp_contains -BOOST_MP11_MODULE_EXPORT template using mp_contains = mp_to_bool>; +template using mp_contains = mp_to_bool>; // mp_repeat(_c) namespace detail @@ -285,8 +285,8 @@ template struct mp_repeat_c_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_repeat = typename detail::mp_repeat_c_impl::type; +template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; +template using mp_repeat = typename detail::mp_repeat_c_impl::type; // mp_product namespace detail @@ -322,8 +322,8 @@ template class F, class L1, class... L> struct mp_product_imp } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F, class... L> using mp_product = typename detail::mp_product_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_product_q = typename detail::mp_product_impl::type; +template class F, class... L> using mp_product = typename detail::mp_product_impl::type; +template using mp_product_q = typename detail::mp_product_impl::type; // mp_drop(_c) namespace detail @@ -342,9 +342,9 @@ template class L, class... T, template class L2, cl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; +template using mp_drop_c = mp_assign, mp_repeat_c, N>, mp_bool::value>>::type>; -BOOST_MP11_MODULE_EXPORT template using mp_drop = mp_drop_c; +template using mp_drop = mp_drop_c; // mp_from_sequence namespace detail @@ -359,11 +359,11 @@ template class S, class U, U... J, class F> struct mp_ } // namespace detail -BOOST_MP11_MODULE_EXPORT template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; +template> using mp_from_sequence = typename detail::mp_from_sequence_impl::type; // mp_iota(_c) -BOOST_MP11_MODULE_EXPORT template using mp_iota_c = mp_from_sequence, mp_size_t>; -BOOST_MP11_MODULE_EXPORT template> using mp_iota = mp_from_sequence::type, N::value>, F>; +template using mp_iota_c = mp_from_sequence, mp_size_t>; +template> using mp_iota = mp_from_sequence::type, N::value>, F>; // mp_at(_c) namespace detail @@ -414,11 +414,11 @@ template using mp_at_c = typename detail::mp_at_c_cuda_w #else -BOOST_MP11_MODULE_EXPORT template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; +template using mp_at_c = typename mp_if_c<(I < mp_size::value), detail::mp_at_c_impl, void>::type; #endif -BOOST_MP11_MODULE_EXPORT template using mp_at = mp_at_c; +template using mp_at = mp_at_c; // mp_take(_c) namespace detail @@ -496,18 +496,18 @@ struct mp_take_c_impl, typen } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_take_c = mp_assign>::type>; -BOOST_MP11_MODULE_EXPORT template using mp_take = mp_take_c; +template using mp_take_c = mp_assign>::type>; +template using mp_take = mp_take_c; // mp_slice(_c) -BOOST_MP11_MODULE_EXPORT template using mp_slice_c = mp_drop_c< mp_take_c, I >; -BOOST_MP11_MODULE_EXPORT template using mp_slice = mp_drop< mp_take, I >; +template using mp_slice_c = mp_drop_c< mp_take_c, I >; +template using mp_slice = mp_drop< mp_take, I >; // mp_back -BOOST_MP11_MODULE_EXPORT template using mp_back = mp_at_c::value - 1>; +template using mp_back = mp_at_c::value - 1>; // mp_pop_back -BOOST_MP11_MODULE_EXPORT template using mp_pop_back = mp_take_c::value - 1>; +template using mp_pop_back = mp_take_c::value - 1>; // mp_replace namespace detail @@ -528,7 +528,7 @@ template class L, class... T, class V, class W> struct mp_rep } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_replace = typename detail::mp_replace_impl::type; +template using mp_replace = typename detail::mp_replace_impl::type; // mp_replace_if namespace detail @@ -549,8 +549,8 @@ template class L, class... T, template class P, cla } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_replace_if_q = mp_replace_if; +template class P, class W> using mp_replace_if = typename detail::mp_replace_if_impl::type; +template using mp_replace_if_q = mp_replace_if; // mp_copy_if // in detail/mp_copy_if.hpp @@ -574,7 +574,7 @@ template class L, class... T, class V> struct mp_remove_impl< } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_remove = typename detail::mp_remove_impl::type; +template using mp_remove = typename detail::mp_remove_impl::type; // mp_remove_if // in detail/mp_remove_if.hpp @@ -590,7 +590,7 @@ template struct mp_flatten_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template> using mp_flatten = mp_apply, L>, mp_clear>>; +template> using mp_flatten = mp_apply, L>, mp_clear>>; // mp_partition namespace detail @@ -605,8 +605,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_partition = typename detail::mp_partition_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_partition_q = mp_partition; +template class P> using mp_partition = typename detail::mp_partition_impl::type; +template using mp_partition_q = mp_partition; // mp_sort namespace detail @@ -650,8 +650,8 @@ template class L, class T1, class... T, template cl } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_sort = typename detail::mp_sort_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_sort_q = mp_sort; +template class P> using mp_sort = typename detail::mp_sort_impl::type; +template using mp_sort_q = mp_sort; // mp_nth_element(_c) namespace detail @@ -711,9 +711,9 @@ template class L, class T1, class... T, std::size_t I, templa } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; -BOOST_MP11_MODULE_EXPORT template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_nth_element_q = mp_nth_element; +template class P> using mp_nth_element_c = typename detail::mp_nth_element_impl::type; +template class P> using mp_nth_element = typename detail::mp_nth_element_impl::type; +template using mp_nth_element_q = mp_nth_element; // mp_find namespace detail @@ -792,7 +792,7 @@ template class L, class T1, class... T, class V> struct mp_fi } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_find = typename detail::mp_find_impl::type; +template using mp_find = typename detail::mp_find_impl::type; // mp_find_if namespace detail @@ -847,8 +847,8 @@ template class L, class T1, class... T, template cl } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_find_if = typename detail::mp_find_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_find_if_q = mp_find_if; +template class P> using mp_find_if = typename detail::mp_find_if_impl::type; +template using mp_find_if_q = mp_find_if; // mp_reverse namespace detail @@ -925,7 +925,7 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_reverse = typename detail::mp_reverse_impl::type; +template using mp_reverse = typename detail::mp_reverse_impl::type; // mp_fold // in detail/mp_fold.hpp @@ -967,8 +967,8 @@ template class L, class T1, class T2, class T3, class T4, cla } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_reverse_fold_q = mp_reverse_fold; +template class F> using mp_reverse_fold = typename detail::mp_reverse_fold_impl::type; +template using mp_reverse_fold_q = mp_reverse_fold; // mp_unique namespace detail @@ -983,7 +983,7 @@ template class L, class... T> struct mp_unique_impl> } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_unique = typename detail::mp_unique_impl::type; +template using mp_unique = typename detail::mp_unique_impl::type; // mp_unique_if namespace detail @@ -1006,23 +1006,22 @@ template class P> struct mp_unique_if_push_back } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_unique_if = mp_fold_q, detail::mp_unique_if_push_back

>; -BOOST_MP11_MODULE_EXPORT template using mp_unique_if_q = mp_unique_if; +template using mp_unique_if_q = mp_unique_if; // mp_all_of -BOOST_MP11_MODULE_EXPORT template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; -BOOST_MP11_MODULE_EXPORT template using mp_all_of_q = mp_all_of; +template class P> using mp_all_of = mp_bool< mp_count_if::value == mp_size::value >; +template using mp_all_of_q = mp_all_of; // mp_none_of -BOOST_MP11_MODULE_EXPORT template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; -BOOST_MP11_MODULE_EXPORT template using mp_none_of_q = mp_none_of; +template class P> using mp_none_of = mp_bool< mp_count_if::value == 0 >; +template using mp_none_of_q = mp_none_of; // mp_any_of -BOOST_MP11_MODULE_EXPORT template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; -BOOST_MP11_MODULE_EXPORT template using mp_any_of_q = mp_any_of; +template class P> using mp_any_of = mp_bool< mp_count_if::value != 0 >; +template using mp_any_of_q = mp_any_of; // mp_replace_at_c namespace detail @@ -1040,8 +1039,8 @@ template struct mp_replace_at_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_replace_at = typename detail::mp_replace_at_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; +template using mp_replace_at = typename detail::mp_replace_at_impl::type; +template using mp_replace_at_c = typename detail::mp_replace_at_impl, W>::type; //mp_for_each(f) namespace detail @@ -1081,7 +1080,7 @@ template BOOST_MP11_CONSTEXPR mp_if_c::value >= 102 #else -BOOST_MP11_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) +template BOOST_MP11_CONSTEXPR F mp_for_each( F && f ) { return detail::mp_for_each_impl( mp_rename(), std::forward(f) ); } @@ -1089,16 +1088,16 @@ BOOST_MP11_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F mp_fo #endif // mp_insert -BOOST_MP11_MODULE_EXPORT template using mp_insert = mp_append, mp_push_front, T...>>; +template using mp_insert = mp_append, mp_push_front, T...>>; // mp_insert_c -BOOST_MP11_MODULE_EXPORT template using mp_insert_c = mp_append, mp_push_front, T...>>; +template using mp_insert_c = mp_append, mp_push_front, T...>>; // mp_erase -BOOST_MP11_MODULE_EXPORT template using mp_erase = mp_append, mp_drop>; +template using mp_erase = mp_append, mp_drop>; // mp_erase_c -BOOST_MP11_MODULE_EXPORT template using mp_erase_c = mp_append, mp_drop_c>; +template using mp_erase_c = mp_append, mp_drop_c>; // mp_starts_with // contributed by Glen Joseph Fernandes (glenjofe@gmail.com) @@ -1121,7 +1120,6 @@ struct mp_starts_with_impl, L2 > { } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_starts_with = typename detail::mp_starts_with_impl::type; @@ -1140,12 +1138,12 @@ template> using mp_rotate_imp } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; -BOOST_MP11_MODULE_EXPORT template using mp_rotate_left = mp_rotate_left_c; +template using mp_rotate_left_c = detail::mp_rotate_impl::value, N>>; +template using mp_rotate_left = mp_rotate_left_c; // mp_rotate_right(_c) -BOOST_MP11_MODULE_EXPORT template using mp_rotate_right_c = mp_rotate_left::value, N>>; -BOOST_MP11_MODULE_EXPORT template using mp_rotate_right = mp_rotate_right_c; +template using mp_rotate_right_c = mp_rotate_left::value, N>>; +template using mp_rotate_right = mp_rotate_right_c; // mp_min_element // mp_max_element @@ -1159,7 +1157,7 @@ template struct mp_power_set_impl; } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_power_set = typename detail::mp_power_set_impl::type; +template using mp_power_set = typename detail::mp_power_set_impl::type; namespace detail { @@ -1213,8 +1211,8 @@ template class F> struct mp_partial_sum_impl_f } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; -BOOST_MP11_MODULE_EXPORT template using mp_partial_sum_q = mp_partial_sum; +template class F> using mp_partial_sum = mp_second>, detail::mp_partial_sum_impl_f> >; +template using mp_partial_sum_q = mp_partial_sum; // mp_iterate namespace detail @@ -1224,7 +1222,7 @@ template class F, template class R, class } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; +template class F, template class R> using mp_iterate = typename detail::mp_iterate_impl>::type; namespace detail { @@ -1242,7 +1240,7 @@ template class F, template class R> struct } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_iterate_q = mp_iterate; +template using mp_iterate_q = mp_iterate; // mp_pairwise_fold namespace detail @@ -1252,8 +1250,8 @@ template using mp_pairwise_fold_impl = mp_transform_q using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; -BOOST_MP11_MODULE_EXPORT template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; +template using mp_pairwise_fold_q = mp_eval_if, mp_clear, detail::mp_pairwise_fold_impl, L, Q>; +template class F> using mp_pairwise_fold = mp_pairwise_fold_q>; // mp_sliding_fold namespace detail @@ -1279,8 +1277,8 @@ template struct mp_sliding_fold_impl using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; -BOOST_MP11_MODULE_EXPORT template class F> using mp_sliding_fold = mp_sliding_fold_q>; +template using mp_sliding_fold_q = typename detail::mp_sliding_fold_impl::value >= N::value)>, L, N, Q>::type; +template class F> using mp_sliding_fold = mp_sliding_fold_q>; // mp_intersperse namespace detail @@ -1314,7 +1312,7 @@ template class L, class T1, class... T, class S> struct mp_in } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_intersperse = typename detail::mp_intersperse_impl::type; +template using mp_intersperse = typename detail::mp_intersperse_impl::type; // mp_split namespace detail @@ -1324,7 +1322,7 @@ template struct mp_split_impl; } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_split = typename detail::mp_split_impl>::type; +template using mp_split = typename detail::mp_split_impl>::type; namespace detail { @@ -1340,7 +1338,7 @@ template struct mp_split_impl // mp_join -BOOST_MP11_MODULE_EXPORT template using mp_join = mp_apply>>; +template using mp_join = mp_apply>>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index d326d04d..d6cd2ad0 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -26,7 +26,7 @@ namespace mp11 { // mp_bind_front -BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind_front +template class F, class... T> struct mp_bind_front { // the indirection through mp_defer works around the language inability // to expand U... into a fixed parameter list of an alias template @@ -34,34 +34,34 @@ BOOST_MP11_MODULE_EXPORT template class F, class... T> struct template using fn = typename mp_defer::type; }; -BOOST_MP11_MODULE_EXPORT template using mp_bind_front_q = mp_bind_front; +template using mp_bind_front_q = mp_bind_front; // mp_bind_back -BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind_back +template class F, class... T> struct mp_bind_back { template using fn = typename mp_defer::type; }; -BOOST_MP11_MODULE_EXPORT template using mp_bind_back_q = mp_bind_back; +template using mp_bind_back_q = mp_bind_back; // mp_arg -BOOST_MP11_MODULE_EXPORT template struct mp_arg +template struct mp_arg { template using fn = mp_at_c, I>; }; -BOOST_MP11_MODULE_EXPORT using _1 = mp_arg<0>; -BOOST_MP11_MODULE_EXPORT using _2 = mp_arg<1>; -BOOST_MP11_MODULE_EXPORT using _3 = mp_arg<2>; -BOOST_MP11_MODULE_EXPORT using _4 = mp_arg<3>; -BOOST_MP11_MODULE_EXPORT using _5 = mp_arg<4>; -BOOST_MP11_MODULE_EXPORT using _6 = mp_arg<5>; -BOOST_MP11_MODULE_EXPORT using _7 = mp_arg<6>; -BOOST_MP11_MODULE_EXPORT using _8 = mp_arg<7>; -BOOST_MP11_MODULE_EXPORT using _9 = mp_arg<8>; +using _1 = mp_arg<0>; +using _2 = mp_arg<1>; +using _3 = mp_arg<2>; +using _4 = mp_arg<3>; +using _5 = mp_arg<4>; +using _6 = mp_arg<5>; +using _7 = mp_arg<6>; +using _8 = mp_arg<7>; +using _9 = mp_arg<8>; // mp_bind -BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind; +template class F, class... T> struct mp_bind; namespace detail { @@ -93,7 +93,7 @@ template class F, class... U, class... T> struct eval_bound_a } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F, class... T> struct mp_bind +template class F, class... T> struct mp_bind { #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, == 1915 ) private: @@ -111,7 +111,7 @@ BOOST_MP11_MODULE_EXPORT template class F, class... T> struct #endif }; -BOOST_MP11_MODULE_EXPORT template using mp_bind_q = mp_bind; +template using mp_bind_q = mp_bind; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index 70b1f8a3..44686c73 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -146,12 +146,4 @@ # define BOOST_MP11_DEPRECATED(msg) #endif -// BOOST_MP11_MODULE_EXPORT - -#ifdef BOOST_USE_MODULES -# define BOOST_MP11_MODULE_EXPORT export -#else -# define BOOST_MP11_MODULE_EXPORT -#endif - #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED diff --git a/include/boost/mp11/detail/mp_append.hpp b/include/boost/mp11/detail/mp_append.hpp index fa340ce2..858ee24e 100644 --- a/include/boost/mp11/detail/mp_append.hpp +++ b/include/boost/mp11/detail/mp_append.hpp @@ -307,7 +307,7 @@ struct append_value_lists #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) -BOOST_MP11_MODULE_EXPORT template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; +template using mp_append = typename mp_if_c<(sizeof...(L) > 0 && sizeof...(L) == mp_count_if, mp_is_value_list>::value), detail::append_value_lists, detail::append_type_lists>::template fn; #else diff --git a/include/boost/mp11/detail/mp_copy_if.hpp b/include/boost/mp11/detail/mp_copy_if.hpp index 8951bf83..4edcde09 100644 --- a/include/boost/mp11/detail/mp_copy_if.hpp +++ b/include/boost/mp11/detail/mp_copy_if.hpp @@ -39,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_copy_if_q = mp_copy_if; +template class P> using mp_copy_if = typename detail::mp_copy_if_impl::type; +template using mp_copy_if_q = mp_copy_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index f876840e..bc8aed93 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -82,7 +82,7 @@ template class L, class... T, class V> struct mp_count_impl using mp_count = typename detail::mp_count_impl::type; +template using mp_count = typename detail::mp_count_impl::type; // mp_count_if namespace detail @@ -138,8 +138,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_count_if = typename detail::mp_count_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_count_if_q = mp_count_if; +template class P> using mp_count_if = typename detail::mp_count_if_impl::type; +template using mp_count_if_q = mp_count_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_defer.hpp b/include/boost/mp11/detail/mp_defer.hpp index e57e7abf..bf2f0145 100644 --- a/include/boost/mp11/detail/mp_defer.hpp +++ b/include/boost/mp11/detail/mp_defer.hpp @@ -33,8 +33,8 @@ template struct mp_if_c_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_if_c = typename detail::mp_if_c_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; +template using mp_if_c = typename detail::mp_if_c_impl::type; +template using mp_if = typename detail::mp_if_c_impl(C::value), T, E...>::type; // mp_valid @@ -73,11 +73,11 @@ template class F, class... T> struct mp_valid_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; + template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; #endif -BOOST_MP11_MODULE_EXPORT template using mp_valid_q = mp_valid; + template using mp_valid_q = mp_valid; // mp_defer namespace detail @@ -109,7 +109,7 @@ template class F, class... T> using mp_defer = typename detai #else -BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; + template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; #endif diff --git a/include/boost/mp11/detail/mp_fold.hpp b/include/boost/mp11/detail/mp_fold.hpp index 92e8fc00..e2c464c9 100644 --- a/include/boost/mp11/detail/mp_fold.hpp +++ b/include/boost/mp11/detail/mp_fold.hpp @@ -157,8 +157,8 @@ struct mp_fold_impl, V, F> } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; -BOOST_MP11_MODULE_EXPORT template using mp_fold_q = mp_fold; +template class F> using mp_fold = typename detail::mp_fold_impl, V, F>::type; +template using mp_fold_q = mp_fold; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_front.hpp b/include/boost/mp11/detail/mp_front.hpp index 67149bc0..53a73ac3 100644 --- a/include/boost/mp11/detail/mp_front.hpp +++ b/include/boost/mp11/detail/mp_front.hpp @@ -42,7 +42,7 @@ template class L, auto A1, auto... A> struct mp_front_impl using mp_front = typename detail::mp_front_impl::type; +template using mp_front = typename detail::mp_front_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_list.hpp b/include/boost/mp11/detail/mp_is_list.hpp index 06457990..ac476834 100644 --- a/include/boost/mp11/detail/mp_is_list.hpp +++ b/include/boost/mp11/detail/mp_is_list.hpp @@ -32,7 +32,7 @@ template class L, class... T> struct mp_is_list_impl> } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_is_list = typename detail::mp_is_list_impl::type; +template using mp_is_list = typename detail::mp_is_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_is_value_list.hpp b/include/boost/mp11/detail/mp_is_value_list.hpp index 37d210ba..8f94f030 100644 --- a/include/boost/mp11/detail/mp_is_value_list.hpp +++ b/include/boost/mp11/detail/mp_is_value_list.hpp @@ -33,7 +33,7 @@ template class L, auto... A> struct mp_is_value_list_impl using mp_is_value_list = typename detail::mp_is_value_list_impl::type; +template using mp_is_value_list = typename detail::mp_is_value_list_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_list.hpp b/include/boost/mp11/detail/mp_list.hpp index b5c9e3a3..feafbf10 100644 --- a/include/boost/mp11/detail/mp_list.hpp +++ b/include/boost/mp11/detail/mp_list.hpp @@ -16,7 +16,6 @@ namespace mp11 { // mp_list -BOOST_MP11_MODULE_EXPORT template struct mp_list { }; diff --git a/include/boost/mp11/detail/mp_list_v.hpp b/include/boost/mp11/detail/mp_list_v.hpp index 432e6962..bc05238a 100644 --- a/include/boost/mp11/detail/mp_list_v.hpp +++ b/include/boost/mp11/detail/mp_list_v.hpp @@ -15,7 +15,6 @@ namespace mp11 #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) // mp_list_v -BOOST_MP11_MODULE_EXPORT template struct mp_list_v { }; diff --git a/include/boost/mp11/detail/mp_map_find.hpp b/include/boost/mp11/detail/mp_map_find.hpp index 4acade1e..2fb70d8e 100644 --- a/include/boost/mp11/detail/mp_map_find.hpp +++ b/include/boost/mp11/detail/mp_map_find.hpp @@ -79,7 +79,7 @@ template class M, class... T, class K> struct mp_map_find_imp } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_map_find = typename detail::mp_map_find_impl::type; +template using mp_map_find = typename detail::mp_map_find_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_min_element.hpp b/include/boost/mp11/detail/mp_min_element.hpp index bee4aa36..a3e9acf6 100644 --- a/include/boost/mp11/detail/mp_min_element.hpp +++ b/include/boost/mp11/detail/mp_min_element.hpp @@ -29,8 +29,8 @@ template class P> struct select_min } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; -BOOST_MP11_MODULE_EXPORT template using mp_min_element_q = mp_min_element; +template class P> using mp_min_element = mp_fold_q, mp_first, detail::select_min

>; +template using mp_min_element_q = mp_min_element; // mp_max_element namespace detail @@ -43,8 +43,8 @@ template class P> struct select_max } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; -BOOST_MP11_MODULE_EXPORT template using mp_max_element_q = mp_max_element; +template class P> using mp_max_element = mp_fold_q, mp_first, detail::select_max

>; +template using mp_max_element_q = mp_max_element; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index 725123e0..ded04f8a 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -78,7 +78,7 @@ template using mp_plus = typename detail::mp_plus_impl::type; +template using mp_plus = typename detail::mp_plus_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_remove_if.hpp b/include/boost/mp11/detail/mp_remove_if.hpp index 62a9d951..9687b4a1 100644 --- a/include/boost/mp11/detail/mp_remove_if.hpp +++ b/include/boost/mp11/detail/mp_remove_if.hpp @@ -39,8 +39,8 @@ template class L, class... T, template class P> str } // namespace detail -BOOST_MP11_MODULE_EXPORT template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_remove_if_q = mp_remove_if; +template class P> using mp_remove_if = typename detail::mp_remove_if_impl::type; +template using mp_remove_if_q = mp_remove_if; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_rename.hpp b/include/boost/mp11/detail/mp_rename.hpp index ade0266a..dde8f6f4 100644 --- a/include/boost/mp11/detail/mp_rename.hpp +++ b/include/boost/mp11/detail/mp_rename.hpp @@ -40,13 +40,13 @@ template class L, auto... A, template class B> struc } // namespace detail -BOOST_MP11_MODULE_EXPORT template class B> using mp_rename = typename detail::mp_rename_impl::type; +template class B> using mp_rename = typename detail::mp_rename_impl::type; // mp_apply -BOOST_MP11_MODULE_EXPORT template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; +template class F, class L> using mp_apply = typename detail::mp_rename_impl::type; // mp_apply_q -BOOST_MP11_MODULE_EXPORT template using mp_apply_q = typename detail::mp_rename_impl::type; +template using mp_apply_q = typename detail::mp_rename_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index f008593f..bb76b074 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -17,7 +17,7 @@ namespace boost namespace mp11 { -BOOST_MP11_MODULE_EXPORT template using mp_value = std::integral_constant; +template using mp_value = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_void.hpp b/include/boost/mp11/detail/mp_void.hpp index 160611a9..75a2934d 100644 --- a/include/boost/mp11/detail/mp_void.hpp +++ b/include/boost/mp11/detail/mp_void.hpp @@ -26,7 +26,7 @@ template struct mp_void_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_void = typename detail::mp_void_impl::type; +template using mp_void = typename detail::mp_void_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index 9465b4c2..890c882c 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -367,13 +367,13 @@ template<> struct mp_with_index_impl_<16> } // namespace detail -BOOST_MP11_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { assert( i < N ); return detail::mp_with_index_impl_::template call<0>( i, std::forward(f) ); } -BOOST_MP11_MODULE_EXPORT template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) +template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { return mp_with_index( i, std::forward(f) ); } diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 3f12546a..598cf394 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -77,7 +77,7 @@ template struct mp_and_impl< mp_list, mp_void.. } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_and = typename detail::mp_and_impl>::type; +template using mp_and = typename detail::mp_and_impl>::type; #endif @@ -89,7 +89,7 @@ template using mp_all = mp_bool< mp_count_if< mp_list, mp_not #else -BOOST_MP11_MODULE_EXPORT template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; +template using mp_all = mp_bool< mp_count< mp_list...>, mp_false >::value == 0 >; #endif @@ -101,7 +101,7 @@ template struct mp_or_impl; } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; +template using mp_or = mp_to_bool< typename detail::mp_or_impl::type >; namespace detail { @@ -131,7 +131,7 @@ template using mp_any = mp_bool< mp_count_if< mp_list, mp_to_b #else -BOOST_MP11_MODULE_EXPORT template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; +template using mp_any = mp_bool< mp_count< mp_list...>, mp_true >::value != 0 >; #endif @@ -153,7 +153,7 @@ template struct mp_same_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_same = typename detail::mp_same_impl::type; +template using mp_same = typename detail::mp_same_impl::type; // mp_similar namespace detail @@ -198,7 +198,7 @@ template struct mp_similar_impl using mp_similar = typename detail::mp_similar_impl::type; +template using mp_similar = typename detail::mp_similar_impl::type; #if BOOST_MP11_GCC # pragma GCC diagnostic push @@ -206,17 +206,17 @@ BOOST_MP11_MODULE_EXPORT template using mp_similar = typename detail #endif // mp_less -BOOST_MP11_MODULE_EXPORT template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; +template using mp_less = mp_bool<(T1::value < 0 && T2::value >= 0) || ((T1::value < T2::value) && !(T1::value >= 0 && T2::value < 0))>; #if BOOST_MP11_GCC # pragma GCC diagnostic pop #endif // mp_min -BOOST_MP11_MODULE_EXPORT template using mp_min = mp_min_element, mp_less>; +template using mp_min = mp_min_element, mp_less>; // mp_max -BOOST_MP11_MODULE_EXPORT template using mp_max = mp_max_element, mp_less>; +template using mp_max = mp_max_element, mp_less>; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index 796a1428..eb9b08ed 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -31,13 +31,13 @@ namespace mp11 { // integer_sequence -BOOST_MP11_MODULE_EXPORT template struct integer_sequence +template struct integer_sequence { }; #if defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) -BOOST_MP11_MODULE_EXPORT template using make_integer_sequence = __make_integer_seq; +template using make_integer_sequence = __make_integer_seq; #else @@ -101,18 +101,18 @@ template struct make_integer_sequence_impl: iseq_if_c using make_integer_sequence = typename detail::make_integer_sequence_impl::type; +template using make_integer_sequence = typename detail::make_integer_sequence_impl::type; #endif // defined(BOOST_MP11_HAS_MAKE_INTEGER_SEQ) // index_sequence -BOOST_MP11_MODULE_EXPORT template using index_sequence = integer_sequence; +template using index_sequence = integer_sequence; // make_index_sequence -BOOST_MP11_MODULE_EXPORT template using make_index_sequence = make_integer_sequence; +template using make_index_sequence = make_integer_sequence; // index_sequence_for -BOOST_MP11_MODULE_EXPORT template using index_sequence_for = make_integer_sequence; +template using index_sequence_for = make_integer_sequence; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index bc8c05bd..0cdbffb1 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -27,22 +27,22 @@ namespace mp11 { // mp_bool -BOOST_MP11_MODULE_EXPORT template using mp_bool = std::integral_constant; +template using mp_bool = std::integral_constant; -BOOST_MP11_MODULE_EXPORT using mp_true = mp_bool; -BOOST_MP11_MODULE_EXPORT using mp_false = mp_bool; +using mp_true = mp_bool; +using mp_false = mp_bool; // mp_to_bool -BOOST_MP11_MODULE_EXPORT template using mp_to_bool = mp_bool( T::value )>; +template using mp_to_bool = mp_bool( T::value )>; // mp_not -BOOST_MP11_MODULE_EXPORT template using mp_not = mp_bool< !T::value >; +template using mp_not = mp_bool< !T::value >; // mp_int -BOOST_MP11_MODULE_EXPORT template using mp_int = std::integral_constant; +template using mp_int = std::integral_constant; // mp_size_t -BOOST_MP11_MODULE_EXPORT template using mp_size_t = std::integral_constant; +template using mp_size_t = std::integral_constant; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index dca53ce9..fe28320e 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -39,7 +39,7 @@ template struct lambda_impl; } // namespace detail // mp_lambda -BOOST_MP11_MODULE_EXPORT template using mp_lambda = typename detail::lambda_impl::type; +template using mp_lambda = typename detail::lambda_impl::type; namespace detail { diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index 11f11368..7f522a3e 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -35,7 +35,6 @@ namespace mp11 // in detail/mp_list.hpp // mp_list_c -BOOST_MP11_MODULE_EXPORT template using mp_list_c = mp_list...>; // mp_list_v @@ -72,11 +71,9 @@ template class L, auto... A> struct mp_size_impl> } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_size = typename detail::mp_size_impl::type; // mp_empty -BOOST_MP11_MODULE_EXPORT template using mp_empty = mp_bool< mp_size::value == 0 >; // mp_assign @@ -114,11 +111,9 @@ template class L1, auto... A, template class L2, auto } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_assign = typename detail::mp_assign_impl::type; // mp_clear -BOOST_MP11_MODULE_EXPORT template using mp_clear = mp_assign>; // mp_front @@ -150,15 +145,12 @@ template class L, auto A1, auto... A> struct mp_pop_front_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_pop_front = typename detail::mp_pop_front_impl::type; // mp_first -BOOST_MP11_MODULE_EXPORT template using mp_first = mp_front; // mp_rest -BOOST_MP11_MODULE_EXPORT template using mp_rest = mp_pop_front; // mp_second @@ -187,7 +179,6 @@ template class L, auto A1, auto A2, auto... A> struct mp_secon } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_second = typename detail::mp_second_impl::type; // mp_third @@ -216,7 +207,6 @@ template class L, auto A1, auto A2, auto A3, auto... A> struct } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_third = typename detail::mp_third_impl::type; // mp_push_front @@ -244,7 +234,6 @@ template class L, auto... A, class... T> struct mp_push_front_ } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_push_front = typename detail::mp_push_front_impl::type; // mp_push_back @@ -272,7 +261,6 @@ template class L, auto... A, class... T> struct mp_push_back_i } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_push_back = typename detail::mp_push_back_impl::type; // mp_rename @@ -303,7 +291,6 @@ template class L, auto... A, template class B> struct } // namespace detail -BOOST_MP11_MODULE_EXPORT template class B> using mp_rename_v = typename detail::mp_rename_v_impl::type; #endif @@ -334,11 +321,9 @@ template class L, auto A1, auto... A, class T> struct mp_repla } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_replace_front = typename detail::mp_replace_front_impl::type; // mp_replace_first -BOOST_MP11_MODULE_EXPORT template using mp_replace_first = typename detail::mp_replace_front_impl::type; // mp_replace_second @@ -367,7 +352,6 @@ template class L, auto A1, auto A2, auto... A, class T> struct } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_replace_second = typename detail::mp_replace_second_impl::type; // mp_replace_third @@ -396,7 +380,6 @@ template class L, auto A1, auto A2, auto A3, auto... A, class } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_replace_third = typename detail::mp_replace_third_impl::type; // mp_transform_front @@ -425,15 +408,11 @@ template class L, auto A1, auto... A, template class } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_front = typename detail::mp_transform_front_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_transform_front_q = mp_transform_front; // mp_transform_first -BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_first = typename detail::mp_transform_front_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_transform_first_q = mp_transform_first; // mp_transform_second @@ -462,9 +441,7 @@ template class L, auto A1, auto A2, auto... A, template class F> using mp_transform_second = typename detail::mp_transform_second_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_transform_second_q = mp_transform_second; // mp_transform_third @@ -493,9 +470,7 @@ template class L, auto A1, auto A2, auto A3, auto... A, templa } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_transform_third = typename detail::mp_transform_third_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_transform_third_q = mp_transform_third; } // namespace mp11 diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index bca144d9..d4cd7c10 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -26,10 +26,10 @@ namespace mp11 { // mp_map_contains -BOOST_MP11_MODULE_EXPORT template using mp_map_contains = mp_not, void>>; +template using mp_map_contains = mp_not, void>>; // mp_map_insert -BOOST_MP11_MODULE_EXPORT template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; +template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; // mp_map_replace namespace detail @@ -50,7 +50,7 @@ template class M, class... U, class T> struct mp_map_replace_ } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_map_replace = typename detail::mp_map_replace_impl::type; +template using mp_map_replace = typename detail::mp_map_replace_impl::type; // mp_map_update namespace detail @@ -68,8 +68,8 @@ template class F> struct mp_map_update_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F> using mp_map_update = typename detail::mp_map_update_impl::type; -BOOST_MP11_MODULE_EXPORT template using mp_map_update_q = mp_map_update; +template class F> using mp_map_update = typename detail::mp_map_update_impl::type; +template using mp_map_update_q = mp_map_update; // mp_map_erase namespace detail @@ -83,10 +83,10 @@ template struct mp_map_erase_impl } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_map_erase = typename detail::mp_map_erase_impl::type; +template using mp_map_erase = typename detail::mp_map_erase_impl::type; // mp_map_keys -BOOST_MP11_MODULE_EXPORT template using mp_map_keys = mp_transform; +template using mp_map_keys = mp_transform; // mp_is_map namespace detail @@ -114,7 +114,7 @@ template class M, class... T> struct mp_is_map_impl> } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_is_map = typename detail::mp_is_map_impl::type; +template using mp_is_map = typename detail::mp_is_map_impl::type; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/set.hpp b/include/boost/mp11/set.hpp index 8780bcff..045cf1fc 100644 --- a/include/boost/mp11/set.hpp +++ b/include/boost/mp11/set.hpp @@ -41,7 +41,7 @@ template class L, class... T, class V> struct mp_set_contains } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_set_contains = typename detail::mp_set_contains_impl::type; +template using mp_set_contains = typename detail::mp_set_contains_impl::type; // mp_set_push_back namespace detail @@ -64,7 +64,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; +template using mp_set_push_back = typename detail::mp_set_push_back_impl::type; // mp_set_push_front namespace detail @@ -92,7 +92,7 @@ template class L, class... U, class T1, class... T> struct mp } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; +template using mp_set_push_front = typename detail::mp_set_push_front_impl::type; // mp_is_set namespace detail @@ -140,7 +140,7 @@ template class L, class... T> struct mp_is_set_impl> } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_is_set = typename detail::mp_is_set_impl::type; +template using mp_is_set = typename detail::mp_is_set_impl::type; // mp_set_union namespace detail @@ -173,7 +173,7 @@ template struct mp_set_union_impl using mp_set_union = typename detail::mp_set_union_impl::type; +template using mp_set_union = typename detail::mp_set_union_impl::type; // mp_set_intersection namespace detail @@ -201,7 +201,7 @@ template struct mp_set_intersection_impl: mp_defer } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; +template using mp_set_intersection = typename detail::mp_set_intersection_impl::type; // mp_set_difference namespace detail @@ -214,7 +214,7 @@ template struct in_any_set } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; +template using mp_set_difference = mp_if< mp_all...>, mp_remove_if_q> >; } // namespace mp11 } // namespace boost diff --git a/include/boost/mp11/tuple.hpp b/include/boost/mp11/tuple.hpp index 912a0cfc..cc199e25 100644 --- a/include/boost/mp11/tuple.hpp +++ b/include/boost/mp11/tuple.hpp @@ -43,7 +43,6 @@ template BOOST_MP11_CONSTEXPR auto tuple_ap } // namespace detail -BOOST_MP11_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_apply( F && f, Tp && tp ) @@ -63,7 +62,6 @@ template BOOST_MP11_CONSTEXPR T construct_f } // namespace detail -BOOST_MP11_MODULE_EXPORT template::type>::value>> BOOST_MP11_CONSTEXPR T construct_from_tuple( Tp && tp ) @@ -88,7 +86,6 @@ template BOOST_MP11_CONSTEXPR F tuple_for_each_impl( Tp && /* } // namespace detail -BOOST_MP11_MODULE_EXPORT template BOOST_MP11_CONSTEXPR F tuple_for_each( Tp && tp, F && f ) { using seq = make_index_sequence::type>::value>; @@ -156,7 +153,6 @@ BOOST_MP11_CONSTEXPR auto tuple_transform_impl( integer_sequence::type>::value>> BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) @@ -167,7 +163,6 @@ BOOST_MP11_CONSTEXPR auto tuple_transform( F const& f, Tp1&& tp1, Tp&&... tp ) #else -BOOST_MP11_MODULE_EXPORT template::type>::value>...>, class E = mp_if, mp_front>, diff --git a/include/boost/mp11/utility.hpp b/include/boost/mp11/utility.hpp index 6cc1b62c..4010aee2 100644 --- a/include/boost/mp11/utility.hpp +++ b/include/boost/mp11/utility.hpp @@ -22,18 +22,15 @@ namespace mp11 { // mp_identity -BOOST_MP11_MODULE_EXPORT template struct mp_identity { using type = T; }; // mp_identity_t -BOOST_MP11_MODULE_EXPORT template using mp_identity_t = typename mp_identity::type; // mp_inherit -BOOST_MP11_MODULE_EXPORT template struct mp_inherit: T... {}; // mp_if, mp_if_c @@ -58,21 +55,21 @@ template class F, class... U> struct mp_eval_if_c_im } // namespace detail -BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; -BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; -BOOST_MP11_MODULE_EXPORT template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; +template class F, class... U> using mp_eval_if_c = typename detail::mp_eval_if_c_impl::type; +template class F, class... U> using mp_eval_if = typename detail::mp_eval_if_c_impl(C::value), T, F, U...>::type; +template using mp_eval_if_q = typename detail::mp_eval_if_c_impl(C::value), T, Q::template fn, U...>::type; // mp_eval_if_not -BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; -BOOST_MP11_MODULE_EXPORT template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; +template class F, class... U> using mp_eval_if_not = mp_eval_if, T, F, U...>; +template using mp_eval_if_not_q = mp_eval_if, T, Q::template fn, U...>; // mp_eval_or -BOOST_MP11_MODULE_EXPORT template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; -BOOST_MP11_MODULE_EXPORT template using mp_eval_or_q = mp_eval_or; +template class F, class... U> using mp_eval_or = mp_eval_if_not, T, F, U...>; +template using mp_eval_or_q = mp_eval_or; // mp_valid_and_true -BOOST_MP11_MODULE_EXPORT template class F, class... T> using mp_valid_and_true = mp_eval_or; -BOOST_MP11_MODULE_EXPORT template using mp_valid_and_true_q = mp_valid_and_true; +template class F, class... T> using mp_valid_and_true = mp_eval_or; +template using mp_valid_and_true_q = mp_valid_and_true; // mp_cond @@ -86,7 +83,7 @@ template struct mp_cond_impl; } // namespace detail -BOOST_MP11_MODULE_EXPORT template using mp_cond = typename detail::mp_cond_impl::type; +template using mp_cond = typename detail::mp_cond_impl::type; namespace detail { @@ -100,7 +97,6 @@ template struct mp_cond_impl: mp_defer class F> struct mp_quote { // the indirection through mp_defer works around the language inability @@ -110,7 +106,6 @@ template class F> struct mp_quote }; // mp_quote_trait -BOOST_MP11_MODULE_EXPORT template class F> struct mp_quote_trait { template using fn = typename F::type; @@ -134,18 +129,16 @@ template using mp_invoke_q = typename mp_defer using mp_invoke_q = typename Q::template fn; +template using mp_invoke_q = typename Q::template fn; #endif // mp_not_fn

-BOOST_MP11_MODULE_EXPORT template class P> struct mp_not_fn { template using fn = mp_not< mp_invoke_q, T...> >; }; -BOOST_MP11_MODULE_EXPORT template using mp_not_fn_q = mp_not_fn; // mp_compose @@ -158,7 +151,6 @@ template using mp_compose_helper = mp_list< mp_apply_q > #if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) -BOOST_MP11_MODULE_EXPORT template class... F> struct mp_compose { template using fn = mp_front< mp_fold...>, mp_list, detail::mp_compose_helper> >; @@ -166,7 +158,6 @@ template class... F> struct mp_compose #endif -BOOST_MP11_MODULE_EXPORT template struct mp_compose_q { template using fn = mp_front< mp_fold, mp_list, detail::mp_compose_helper> >; diff --git a/modules/boost_mp11.cppm b/modules/boost_mp11.cppm index b6fa99ea..f9ed5d16 100644 --- a/modules/boost_mp11.cppm +++ b/modules/boost_mp11.cppm @@ -1,11 +1,249 @@ module; +import std; #include +#include export module boost.mp11; import std; -extern "C++" { -#include +export namespace boost::mp11 { + +// algorithm +using mp11::mp_transform; +using mp11::mp_transform_q; +using mp11::mp_transform_if; +using mp11::mp_transform_if_q; +using mp11::mp_filter; +using mp11::mp_filter_q; +using mp11::mp_fill; +using mp11::mp_contains; +using mp11::mp_repeat_c; +using mp11::mp_repeat; +using mp11::mp_product; +using mp11::mp_product_q; +using mp11::mp_drop_c; +using mp11::mp_drop; +using mp11::mp_from_sequence; +using mp11::mp_iota_c; +using mp11::mp_iota; +using mp11::mp_at_c; +using mp11::mp_at; +using mp11::mp_take_c; +using mp11::mp_take; +using mp11::mp_slice_c; +using mp11::mp_slice; +using mp11::mp_back; +using mp11::mp_pop_back; +using mp11::mp_replace; +using mp11::mp_replace_if; +using mp11::mp_replace_if_q; +using mp11::mp_remove; +using mp11::mp_flatten; +using mp11::mp_partition; +using mp11::mp_partition_q; +using mp11::mp_sort; +using mp11::mp_sort_q; +using mp11::mp_nth_element_c; +using mp11::mp_nth_element; +using mp11::mp_nth_element_q; +using mp11::mp_find; +using mp11::mp_find_if; +using mp11::mp_find_if_q; +using mp11::mp_reverse; +using mp11::mp_reverse_fold; +using mp11::mp_reverse_fold_q; +using mp11::mp_unique; +using mp11::mp_unique_if; +using mp11::mp_unique_if_q; +using mp11::mp_all_of; +using mp11::mp_all_of_q; +using mp11::mp_none_of; +using mp11::mp_none_of_q; +using mp11::mp_any_of; +using mp11::mp_any_of_q; +using mp11::mp_replace_at; +using mp11::mp_replace_at_c; +using mp11::mp_for_each; +using mp11::mp_insert; +using mp11::mp_insert_c; +using mp11::mp_erase; +using mp11::mp_erase_c; +using mp11::mp_starts_with; +using mp11::mp_rotate_left_c; +using mp11::mp_rotate_left; +using mp11::mp_rotate_right_c; +using mp11::mp_rotate_right; +using mp11::mp_power_set; +using mp11::mp_partial_sum; +using mp11::mp_partial_sum_q; +using mp11::mp_iterate; +using mp11::mp_iterate_q; +using mp11::mp_pairwise_fold_q; +using mp11::mp_pairwise_fold; +using mp11::mp_sliding_fold_q; +using mp11::mp_sliding_fold; +using mp11::mp_intersperse; +using mp11::mp_split; +using mp11::mp_join; + +// bind +using mp11::mp_bind_front; +using mp11::mp_bind_front_q; +using mp11::mp_bind_back; +using mp11::mp_bind_back_q; +using mp11::mp_arg; +using mp11::_1; +using mp11::_2; +using mp11::_3; +using mp11::_4; +using mp11::_5; +using mp11::_6; +using mp11::_7; +using mp11::_8; +using mp11::_9; +using mp11::mp_bind; +using mp11::mp_bind_q; + +// function +using mp11::mp_and; +using mp11::mp_all; +using mp11::mp_or; +using mp11::mp_any; +using mp11::mp_same; +using mp11::mp_similar; +using mp11::mp_less; +using mp11::mp_min; +using mp11::mp_max; + +// integer_sequence +using mp11::integer_sequence; +using mp11::make_integer_sequence; +using mp11::make_integer_sequence; +using mp11::index_sequence; +using mp11::make_index_sequence; +using mp11::index_sequence_for; + +// integral +using mp11::mp_bool; +using mp11::mp_true; +using mp11::mp_false; +using mp11::mp_to_bool; +using mp11::mp_not; +using mp11::mp_int; +using mp11::mp_size_t; + +// lambda +using mp11::mp_lambda; + +// list +using mp11::mp_list_c; +using mp11::mp_size; +using mp11::mp_empty; +using mp11::mp_assign; +using mp11::mp_clear; +using mp11::mp_pop_front; +using mp11::mp_first; +using mp11::mp_rest; +using mp11::mp_second; +using mp11::mp_third; +using mp11::mp_push_front; +using mp11::mp_push_back; +using mp11::mp_rename_v; +using mp11::mp_replace_front; +using mp11::mp_replace_first; +using mp11::mp_replace_second; +using mp11::mp_replace_third; +using mp11::mp_transform_front; +using mp11::mp_transform_front_q; +using mp11::mp_transform_first; +using mp11::mp_transform_first_q; +using mp11::mp_transform_second; +using mp11::mp_transform_second_q; +using mp11::mp_transform_third; +using mp11::mp_transform_third_q; + +// map +using mp11::mp_map_contains; +using mp11::mp_map_insert; +using mp11::mp_map_replace; +using mp11::mp_map_update; +using mp11::mp_map_update_q; +using mp11::mp_map_erase; +using mp11::mp_map_keys; +using mp11::mp_is_map; + +// set +using mp11::mp_set_contains; +using mp11::mp_set_push_back; +using mp11::mp_set_push_front; +using mp11::mp_is_set; +using mp11::mp_set_union; +using mp11::mp_set_intersection; +using mp11::mp_set_difference; + +// tuple +using mp11::tuple_apply; +using mp11::construct_from_tuple; +using mp11::tuple_for_each; +using mp11::tuple_transform; + +// utility +using mp11::mp_identity; +using mp11::mp_identity_t; +using mp11::mp_inherit; +using mp11::mp_eval_if_c; +using mp11::mp_eval_if; +using mp11::mp_eval_if_q; +using mp11::mp_eval_if_not; +using mp11::mp_eval_if_not_q; +using mp11::mp_eval_or; +using mp11::mp_eval_or_q; +using mp11::mp_valid_and_true; +using mp11::mp_valid_and_true_q; +using mp11::mp_cond; +using mp11::mp_quote; +using mp11::mp_quote_trait; +using mp11::mp_invoke_q; +using mp11::mp_not_fn; +using mp11::mp_not_fn_q; +using mp11::mp_compose; +using mp11::mp_compose_q; + +// other +using mp11::mp_list_v; +using mp11::mp_count; +using mp11::mp_count_if; +using mp11::mp_count_if_q; +using mp11::mp_fold; +using mp11::mp_fold_q; +using mp11::mp_copy_if; +using mp11::mp_copy_if_q; +using mp11::mp_with_index; +using mp11::mp_with_index; +using mp11::mp_append; +using mp11::mp_min_element; +using mp11::mp_min_element_q; +using mp11::mp_max_element; +using mp11::mp_max_element_q; +using mp11::mp_is_value_list; +using mp11::mp_is_list; +using mp11::mp_plus; +using mp11::mp_if_c; +using mp11::mp_if; +using mp11::mp_valid; +using mp11::mp_valid_q; +using mp11::mp_defer; +using mp11::mp_rename; +using mp11::mp_apply; +using mp11::mp_apply_q; +using mp11::mp_list; +using mp11::mp_value; +using mp11::mp_map_find; +using mp11::mp_void; +using mp11::mp_remove_if; +using mp11::mp_remove_if_q; +using mp11::mp_front; + } From 9e36eb3a82a60c69efa80235c0fb3b02a6af18ee Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 10 Jan 2025 14:48:19 +0100 Subject: [PATCH 75/86] Experiment with import in GMF --- .github/workflows/ci.yml | 1590 ++++++++--------- .../detail/global_module_fragment_imports.hpp | 1 + modules/boost_mp11.cppm | 2 +- 3 files changed, 797 insertions(+), 796 deletions(-) create mode 100644 include/boost/mp11/detail/global_module_fragment_imports.hpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2c6fd04..8d60fea4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,801 +12,801 @@ env: UBSAN_OPTIONS: print_stacktrace=1 jobs: - posix: - strategy: - fail-fast: false - matrix: - include: - - toolset: gcc-4.8 - cxxstd: "03,11" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-4.8 - - toolset: gcc-4.9 - cxxstd: "03,11" - container: ubuntu:16.04 - os: ubuntu-latest - install: g++-4.9 - - toolset: gcc-5 - cxxstd: "03,11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-5 - - toolset: gcc-6 - cxxstd: "03,11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-6 - - toolset: gcc-7 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: g++-7 - - toolset: gcc-8 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-8 - - toolset: gcc-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: gcc-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-22.04 - install: g++-10 - - toolset: gcc-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-22.04 - - toolset: gcc-12 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-22.04 - install: g++-12 - - toolset: gcc-13 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-latest - container: ubuntu:24.04 - install: g++-13 - - toolset: gcc-14 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-latest - container: ubuntu:24.04 - install: g++-14 - - toolset: clang - compiler: clang++-3.9 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-3.9 - - toolset: clang - compiler: clang++-4.0 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-4.0 - - toolset: clang - compiler: clang++-5.0 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-5.0 - - toolset: clang - compiler: clang++-6.0 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-6.0 - - toolset: clang - compiler: clang++-7 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-7 - - toolset: clang - compiler: clang++-8 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-8 - - toolset: clang - compiler: clang++-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-9 - - toolset: clang - compiler: clang++-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-12 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-13 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-13 - - toolset: clang - compiler: clang++-14 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-14 - - toolset: clang - compiler: clang++-15 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-15 - - toolset: clang - compiler: clang++-16 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-16 - - toolset: clang - compiler: clang++-17 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-17 - - toolset: clang - compiler: clang++-18 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.04 - os: ubuntu-latest - install: clang-18 - - toolset: clang - compiler: clang++-19 - cxxstd: "03,11,14,17,20,2b" - container: ubuntu:24.10 - os: ubuntu-latest - install: clang-19 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-13 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-14 - - toolset: clang - cxxstd: "03,11,14,17,20,2b" - os: macos-15 - - runs-on: ${{matrix.os}} - - container: - image: ${{matrix.container}} - volumes: - - /node20217:/node20217:rw,rshared - - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} - - defaults: - run: - shell: bash - - steps: - - name: Setup container environment - if: matrix.container - run: | - apt-get update - apt-get -y install sudo python3 git g++ curl xz-utils - - - name: Install nodejs20glibc2.17 - if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} - run: | - curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz - tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - ldd /__e/node20/bin/node - - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: | - sudo apt-get update - sudo apt-get -y install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python3 tools/boostdep/depinst/depinst.py $LIBRARY - python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - ./bootstrap.sh - ./b2 -d0 headers - - - name: Create user-config.jam - if: matrix.compiler - run: | - echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - - - name: Run tests - run: | - cd ../boost-root - ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release - - windows: - strategy: - fail-fast: false - matrix: - include: - # msvc-14.0 not included, because it fails with "compiler is out of heap space" - - toolset: msvc-14.2 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2019 - - toolset: msvc-14.3 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: clang-win - cxxstd: "14,17,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: gcc - cxxstd: "03,11,14,17,2a" - addrmd: 64 - os: windows-2019 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - cmd /c bootstrap - b2 -d0 headers - - - name: Run tests - shell: cmd - run: | - cd ../boost-root - b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker - - posix-cmake-subdir: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Use library with add_subdirectory - run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test - mkdir __build__ && cd __build__ - cmake .. - cmake --build . - ctest --output-on-failure --no-tests=error - - posix-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. - - - name: Install - run: | - cd ../boost-root/__build__ - cmake --build . --target install - - - name: Use the installed library - run: | - cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . - ctest --output-on-failure --no-tests=error - - posix-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - echo GITHUB_BASE_REF: $GITHUB_BASE_REF - echo GITHUB_REF: $GITHUB_REF - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. - - - name: Build tests - run: | - cd ../boost-root/__build__ - cmake --build . --target tests - - - name: Run tests - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error - - standalone-cmake-subdir: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Use library with add_subdirectory - run: | - cd test/cmake_subdir_test - mkdir __build__ && cd __build__ - cmake .. - cmake --build . - ctest --output-on-failure --no-tests=error - - standalone-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Configure - run: | - mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - - - name: Install - run: | - cd __build__ - cmake --build . --target install - - - name: Use the installed library - run: | - cd test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . - ctest --output-on-failure --no-tests=error - - standalone-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-22.04 - - os: ubuntu-24.04 - - os: macos-13 - - os: macos-14 - - os: macos-15 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Configure - run: | - mkdir __build__ && cd __build__ - cmake -DBUILD_TESTING=ON .. - - - name: Build tests - run: | - cd __build__ - cmake --build . --target tests - - - name: Run tests - run: | - cd __build__ - ctest --output-on-failure --no-tests=error - - cuda-linux: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.16 - with: - cuda: '11.7.1' - linux-local-args: '["--toolkit"]' - - - name: Setup Boost - run: | - cd .. - git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - - name: Run Tests - run: | - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp - - cuda-windows: - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.16 - - uses: ilammy/msvc-dev-cmd@v1 - - - name: Setup Boost - run: | - cd .. - git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - git clone --depth 1 https://github.com/boostorg/config - git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - - name: Run Tests - shell: cmd - run: | - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b - nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b - - windows-cmake-subdir: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Use library with add_subdirectory (Debug) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test - mkdir __build__ && cd __build__ - cmake .. - cmake --build . --config Debug - ctest --output-on-failure --no-tests=error -C Debug - - - name: Use library with add_subdirectory (Release) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ - cmake --build . --config Release - ctest --output-on-failure --no-tests=error -C Release - - windows-cmake-install: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - shell: cmd - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - - - name: Install (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target install --config Debug - - - name: Install (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target install --config Release - - - name: Use the installed library (Debug) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - cmake --build . --config Debug - ctest --output-on-failure --no-tests=error -C Debug - - - name: Use the installed library (Release) - shell: cmd - run: | - cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ - cmake --build . --config Release - ctest --output-on-failure --no-tests=error -C Release - - windows-cmake-test: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2019 - - os: windows-2022 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Boost - shell: cmd - run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - - name: Configure - shell: cmd - run: | - cd ../boost-root - mkdir __build__ && cd __build__ - cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. - - - name: Build tests (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target tests --config Debug - - - name: Run tests (Debug) - shell: cmd - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error -C Debug - - - name: Build tests (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - cmake --build . --target tests --config Release - - - name: Run tests (Release) - shell: cmd - run: | - cd ../boost-root/__build__ - ctest --output-on-failure --no-tests=error -C Release + # posix: + # strategy: + # fail-fast: false + # matrix: + # include: + # - toolset: gcc-4.8 + # cxxstd: "03,11" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-4.8 + # - toolset: gcc-4.9 + # cxxstd: "03,11" + # container: ubuntu:16.04 + # os: ubuntu-latest + # install: g++-4.9 + # - toolset: gcc-5 + # cxxstd: "03,11,14,1z" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-5 + # - toolset: gcc-6 + # cxxstd: "03,11,14,1z" + # container: ubuntu:18.04 + # os: ubuntu-latest + # install: g++-6 + # - toolset: gcc-7 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: g++-7 + # - toolset: gcc-8 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # install: g++-8 + # - toolset: gcc-9 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: gcc-10 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-22.04 + # install: g++-10 + # - toolset: gcc-11 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-22.04 + # - toolset: gcc-12 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-22.04 + # install: g++-12 + # - toolset: gcc-13 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-latest + # container: ubuntu:24.04 + # install: g++-13 + # - toolset: gcc-14 + # cxxstd: "03,11,14,17,20,2b" + # os: ubuntu-latest + # container: ubuntu:24.04 + # install: g++-14 + # - toolset: clang + # compiler: clang++-3.9 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-3.9 + # - toolset: clang + # compiler: clang++-4.0 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-4.0 + # - toolset: clang + # compiler: clang++-5.0 + # cxxstd: "03,11,14" + # os: ubuntu-latest + # container: ubuntu:18.04 + # install: clang-5.0 + # - toolset: clang + # compiler: clang++-6.0 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-6.0 + # - toolset: clang + # compiler: clang++-7 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-7 + # - toolset: clang + # compiler: clang++-8 + # cxxstd: "03,11,14,17" + # os: ubuntu-20.04 + # install: clang-8 + # - toolset: clang + # compiler: clang++-9 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # install: clang-9 + # - toolset: clang + # compiler: clang++-10 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-11 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-12 + # cxxstd: "03,11,14,17,2a" + # os: ubuntu-20.04 + # - toolset: clang + # compiler: clang++-13 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-13 + # - toolset: clang + # compiler: clang++-14 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-14 + # - toolset: clang + # compiler: clang++-15 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:22.04 + # os: ubuntu-latest + # install: clang-15 + # - toolset: clang + # compiler: clang++-16 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-16 + # - toolset: clang + # compiler: clang++-17 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-17 + # - toolset: clang + # compiler: clang++-18 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.04 + # os: ubuntu-latest + # install: clang-18 + # - toolset: clang + # compiler: clang++-19 + # cxxstd: "03,11,14,17,20,2b" + # container: ubuntu:24.10 + # os: ubuntu-latest + # install: clang-19 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-13 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-14 + # - toolset: clang + # cxxstd: "03,11,14,17,20,2b" + # os: macos-15 + + # runs-on: ${{matrix.os}} + + # container: + # image: ${{matrix.container}} + # volumes: + # - /node20217:/node20217:rw,rshared + # - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + + # defaults: + # run: + # shell: bash + + # steps: + # - name: Setup container environment + # if: matrix.container + # run: | + # apt-get update + # apt-get -y install sudo python3 git g++ curl xz-utils + + # - name: Install nodejs20glibc2.17 + # if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} + # run: | + # curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz + # tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + # ldd /__e/node20/bin/node + + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: | + # sudo apt-get update + # sudo apt-get -y install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # git submodule update --init tools/boostdep + # python3 tools/boostdep/depinst/depinst.py $LIBRARY + # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + # ./bootstrap.sh + # ./b2 -d0 headers + + # - name: Create user-config.jam + # if: matrix.compiler + # run: | + # echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + + # - name: Run tests + # run: | + # cd ../boost-root + # ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release + + # windows: + # strategy: + # fail-fast: false + # matrix: + # include: + # # msvc-14.0 not included, because it fails with "compiler is out of heap space" + # - toolset: msvc-14.2 + # cxxstd: "14,17,20,latest" + # addrmd: 32,64 + # os: windows-2019 + # - toolset: msvc-14.3 + # cxxstd: "14,17,20,latest" + # addrmd: 32,64 + # os: windows-2022 + # - toolset: clang-win + # cxxstd: "14,17,latest" + # addrmd: 32,64 + # os: windows-2022 + # - toolset: gcc + # cxxstd: "03,11,14,17,2a" + # addrmd: 64 + # os: windows-2019 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + # cmd /c bootstrap + # b2 -d0 headers + + # - name: Run tests + # shell: cmd + # run: | + # cd ../boost-root + # b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + + # posix-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # posix-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. + + # - name: Install + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install + + # - name: Use the installed library + # run: | + # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # posix-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Setup Boost + # run: | + # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + # LIBRARY=${GITHUB_REPOSITORY#*/} + # echo LIBRARY: $LIBRARY + # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + # echo GITHUB_BASE_REF: $GITHUB_BASE_REF + # echo GITHUB_REF: $GITHUB_REF + # REF=${GITHUB_BASE_REF:-$GITHUB_REF} + # REF=${REF#refs/heads/} + # echo REF: $REF + # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + # echo BOOST_BRANCH: $BOOST_BRANCH + # cd .. + # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. + + # - name: Build tests + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests + + # - name: Run tests + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Use library with add_subdirectory + # run: | + # cd test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Configure + # run: | + # mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + + # - name: Install + # run: | + # cd __build__ + # cmake --build . --target install + + # - name: Use the installed library + # run: | + # cd test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + # cmake --build . + # ctest --output-on-failure --no-tests=error + + # standalone-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # - os: ubuntu-22.04 + # - os: ubuntu-24.04 + # - os: macos-13 + # - os: macos-14 + # - os: macos-15 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Install packages + # if: matrix.install + # run: sudo apt install ${{matrix.install}} + + # - name: Configure + # run: | + # mkdir __build__ && cd __build__ + # cmake -DBUILD_TESTING=ON .. + + # - name: Build tests + # run: | + # cd __build__ + # cmake --build . --target tests + + # - name: Run tests + # run: | + # cd __build__ + # ctest --output-on-failure --no-tests=error + + # cuda-linux: + # runs-on: ubuntu-20.04 + + # steps: + # - uses: actions/checkout@v4 + # - uses: Jimver/cuda-toolkit@v0.2.16 + # with: + # cuda: '11.7.1' + # linux-local-args: '["--toolkit"]' + + # - name: Setup Boost + # run: | + # cd .. + # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + # git clone --depth 1 https://github.com/boostorg/config + # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + # - name: Run Tests + # run: | + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp + + # cuda-windows: + # runs-on: windows-2019 + + # steps: + # - uses: actions/checkout@v4 + # - uses: Jimver/cuda-toolkit@v0.2.16 + # - uses: ilammy/msvc-dev-cmd@v1 + + # - name: Setup Boost + # run: | + # cd .. + # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + # git clone --depth 1 https://github.com/boostorg/config + # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + # - name: Run Tests + # shell: cmd + # run: | + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b + # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b + + # windows-cmake-subdir: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Use library with add_subdirectory (Debug) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + # mkdir __build__ && cd __build__ + # cmake .. + # cmake --build . --config Debug + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Use library with add_subdirectory (Release) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ + # cmake --build . --config Release + # ctest --output-on-failure --no-tests=error -C Release + + # windows-cmake-install: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # shell: cmd + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + + # - name: Install (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install --config Debug + + # - name: Install (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target install --config Release + + # - name: Use the installed library (Debug) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + # cmake --build . --config Debug + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Use the installed library (Release) + # shell: cmd + # run: | + # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ + # cmake --build . --config Release + # ctest --output-on-failure --no-tests=error -C Release + + # windows-cmake-test: + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2019 + # - os: windows-2022 + + # runs-on: ${{matrix.os}} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Boost + # shell: cmd + # run: | + # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + # echo LIBRARY: %LIBRARY% + # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + # echo GITHUB_REF: %GITHUB_REF% + # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + # set BOOST_BRANCH=develop + # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + # echo BOOST_BRANCH: %BOOST_BRANCH% + # cd .. + # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + # cd boost-root + # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + # git submodule update --init tools/boostdep + # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + # python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + # - name: Configure + # shell: cmd + # run: | + # cd ../boost-root + # mkdir __build__ && cd __build__ + # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. + + # - name: Build tests (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests --config Debug + + # - name: Run tests (Debug) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error -C Debug + + # - name: Build tests (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # cmake --build . --target tests --config Release + + # - name: Run tests (Release) + # shell: cmd + # run: | + # cd ../boost-root/__build__ + # ctest --output-on-failure --no-tests=error -C Release posix-cmake-subdir-modules: runs-on: ubuntu-latest diff --git a/include/boost/mp11/detail/global_module_fragment_imports.hpp b/include/boost/mp11/detail/global_module_fragment_imports.hpp new file mode 100644 index 00000000..0bd254f7 --- /dev/null +++ b/include/boost/mp11/detail/global_module_fragment_imports.hpp @@ -0,0 +1 @@ +import std; \ No newline at end of file diff --git a/modules/boost_mp11.cppm b/modules/boost_mp11.cppm index f9ed5d16..bf574e13 100644 --- a/modules/boost_mp11.cppm +++ b/modules/boost_mp11.cppm @@ -1,6 +1,6 @@ module; -import std; +#include #include #include From e7fe52aee5e728a171a4736490421a30a52e174d Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Fri, 10 Jan 2025 17:26:30 +0100 Subject: [PATCH 76/86] Export using cleanup --- CMakeLists.txt | 7 +++++++ include/boost/mp11/bind.hpp | 1 - .../boost/mp11/detail/global_module_fragment_imports.hpp | 1 - include/boost/mp11/detail/mp_defer.hpp | 6 +++--- include/boost/mp11/detail/mp_is_list.hpp | 1 - include/boost/mp11/detail/mp_list.hpp | 2 -- include/boost/mp11/detail/mp_min_element.hpp | 1 - include/boost/mp11/detail/mp_void.hpp | 2 -- include/boost/mp11/integer_sequence.hpp | 1 - include/boost/mp11/integral.hpp | 1 - include/boost/mp11/map.hpp | 1 - modules/boost_mp11.cppm | 6 ++++-- 12 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 include/boost/mp11/detail/global_module_fragment_imports.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e08100c6..ddedc5c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,13 @@ if (BOOST_USE_MODULES) target_compile_features(boost_mp11 PUBLIC cxx_std_23) set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) target_compile_definitions(boost_mp11 PUBLIC BOOST_USE_MODULES) + + # Silence warnings about includes in the purview + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(boost_mp11 PRIVATE -Wno-include-angled-in-module-purview) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options(boost_mp11 PRIVATE /wd5244) + endif() else() add_library(boost_mp11 INTERFACE) target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index d6cd2ad0..b153dc21 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -10,7 +10,6 @@ #include #include -#include #ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/detail/global_module_fragment_imports.hpp b/include/boost/mp11/detail/global_module_fragment_imports.hpp deleted file mode 100644 index 0bd254f7..00000000 --- a/include/boost/mp11/detail/global_module_fragment_imports.hpp +++ /dev/null @@ -1 +0,0 @@ -import std; \ No newline at end of file diff --git a/include/boost/mp11/detail/mp_defer.hpp b/include/boost/mp11/detail/mp_defer.hpp index bf2f0145..9aaca99e 100644 --- a/include/boost/mp11/detail/mp_defer.hpp +++ b/include/boost/mp11/detail/mp_defer.hpp @@ -73,11 +73,11 @@ template class F, class... T> struct mp_valid_impl } // namespace detail - template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; +template class F, class... T> using mp_valid = typename detail::mp_valid_impl::type; #endif - template using mp_valid_q = mp_valid; +template using mp_valid_q = mp_valid; // mp_defer namespace detail @@ -109,7 +109,7 @@ template class F, class... T> using mp_defer = typename detai #else - template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; +template class F, class... T> using mp_defer = mp_if, detail::mp_defer_impl, detail::mp_no_type>; #endif diff --git a/include/boost/mp11/detail/mp_is_list.hpp b/include/boost/mp11/detail/mp_is_list.hpp index ac476834..25b378bd 100644 --- a/include/boost/mp11/detail/mp_is_list.hpp +++ b/include/boost/mp11/detail/mp_is_list.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include namespace boost { diff --git a/include/boost/mp11/detail/mp_list.hpp b/include/boost/mp11/detail/mp_list.hpp index feafbf10..8e8d3e5e 100644 --- a/include/boost/mp11/detail/mp_list.hpp +++ b/include/boost/mp11/detail/mp_list.hpp @@ -8,8 +8,6 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include - namespace boost { namespace mp11 diff --git a/include/boost/mp11/detail/mp_min_element.hpp b/include/boost/mp11/detail/mp_min_element.hpp index a3e9acf6..55c21acd 100644 --- a/include/boost/mp11/detail/mp_min_element.hpp +++ b/include/boost/mp11/detail/mp_min_element.hpp @@ -11,7 +11,6 @@ #include #include #include -#include namespace boost { diff --git a/include/boost/mp11/detail/mp_void.hpp b/include/boost/mp11/detail/mp_void.hpp index 75a2934d..a7ac7b71 100644 --- a/include/boost/mp11/detail/mp_void.hpp +++ b/include/boost/mp11/detail/mp_void.hpp @@ -8,8 +8,6 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#include - namespace boost { namespace mp11 diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index eb9b08ed..a08a92f8 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include #ifndef BOOST_USE_MODULES #include #endif diff --git a/include/boost/mp11/integral.hpp b/include/boost/mp11/integral.hpp index 0cdbffb1..08e5396a 100644 --- a/include/boost/mp11/integral.hpp +++ b/include/boost/mp11/integral.hpp @@ -10,7 +10,6 @@ #include #include -#include #ifndef BOOST_USE_MODULES #include #include diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index d4cd7c10..d5e01be3 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -9,7 +9,6 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#include #include #include #include diff --git a/modules/boost_mp11.cppm b/modules/boost_mp11.cppm index bf574e13..085729ed 100644 --- a/modules/boost_mp11.cppm +++ b/modules/boost_mp11.cppm @@ -1,13 +1,15 @@ module; -#include #include -#include export module boost.mp11; import std; +extern "C++" { +#include +} + export namespace boost::mp11 { // algorithm From 268f36145c74491a21b03999dab58ad44e6a0463 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sat, 11 Jan 2025 18:27:16 +0100 Subject: [PATCH 77/86] Modularize mp_from_sequence_3 --- test/mp_from_sequence_3.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/mp_from_sequence_3.cpp b/test/mp_from_sequence_3.cpp index 6aba9785..6758690f 100644 --- a/test/mp_from_sequence_3.cpp +++ b/test/mp_from_sequence_3.cpp @@ -2,9 +2,17 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt +#ifdef BOOST_USE_MODULES +#include +import std; +import boost.core; +import boost.mp11; +#else #include #include #include +#endif + template struct S; From 76759bd20e8ce2390425ea78953b56c4f3aeeaa4 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sat, 11 Jan 2025 18:28:31 +0100 Subject: [PATCH 78/86] Recover all CIs --- .github/workflows/ci.yml | 1590 +++++++++++++++++++------------------- 1 file changed, 795 insertions(+), 795 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d60fea4..a2c6fd04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,801 +12,801 @@ env: UBSAN_OPTIONS: print_stacktrace=1 jobs: - # posix: - # strategy: - # fail-fast: false - # matrix: - # include: - # - toolset: gcc-4.8 - # cxxstd: "03,11" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-4.8 - # - toolset: gcc-4.9 - # cxxstd: "03,11" - # container: ubuntu:16.04 - # os: ubuntu-latest - # install: g++-4.9 - # - toolset: gcc-5 - # cxxstd: "03,11,14,1z" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-5 - # - toolset: gcc-6 - # cxxstd: "03,11,14,1z" - # container: ubuntu:18.04 - # os: ubuntu-latest - # install: g++-6 - # - toolset: gcc-7 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: g++-7 - # - toolset: gcc-8 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # install: g++-8 - # - toolset: gcc-9 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: gcc-10 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-22.04 - # install: g++-10 - # - toolset: gcc-11 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-22.04 - # - toolset: gcc-12 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-22.04 - # install: g++-12 - # - toolset: gcc-13 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-latest - # container: ubuntu:24.04 - # install: g++-13 - # - toolset: gcc-14 - # cxxstd: "03,11,14,17,20,2b" - # os: ubuntu-latest - # container: ubuntu:24.04 - # install: g++-14 - # - toolset: clang - # compiler: clang++-3.9 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-3.9 - # - toolset: clang - # compiler: clang++-4.0 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-4.0 - # - toolset: clang - # compiler: clang++-5.0 - # cxxstd: "03,11,14" - # os: ubuntu-latest - # container: ubuntu:18.04 - # install: clang-5.0 - # - toolset: clang - # compiler: clang++-6.0 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-6.0 - # - toolset: clang - # compiler: clang++-7 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-7 - # - toolset: clang - # compiler: clang++-8 - # cxxstd: "03,11,14,17" - # os: ubuntu-20.04 - # install: clang-8 - # - toolset: clang - # compiler: clang++-9 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # install: clang-9 - # - toolset: clang - # compiler: clang++-10 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-11 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-12 - # cxxstd: "03,11,14,17,2a" - # os: ubuntu-20.04 - # - toolset: clang - # compiler: clang++-13 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-13 - # - toolset: clang - # compiler: clang++-14 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-14 - # - toolset: clang - # compiler: clang++-15 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:22.04 - # os: ubuntu-latest - # install: clang-15 - # - toolset: clang - # compiler: clang++-16 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-16 - # - toolset: clang - # compiler: clang++-17 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-17 - # - toolset: clang - # compiler: clang++-18 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.04 - # os: ubuntu-latest - # install: clang-18 - # - toolset: clang - # compiler: clang++-19 - # cxxstd: "03,11,14,17,20,2b" - # container: ubuntu:24.10 - # os: ubuntu-latest - # install: clang-19 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-13 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-14 - # - toolset: clang - # cxxstd: "03,11,14,17,20,2b" - # os: macos-15 - - # runs-on: ${{matrix.os}} - - # container: - # image: ${{matrix.container}} - # volumes: - # - /node20217:/node20217:rw,rshared - # - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} - - # defaults: - # run: - # shell: bash - - # steps: - # - name: Setup container environment - # if: matrix.container - # run: | - # apt-get update - # apt-get -y install sudo python3 git g++ curl xz-utils - - # - name: Install nodejs20glibc2.17 - # if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} - # run: | - # curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz - # tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - # ldd /__e/node20/bin/node - - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: | - # sudo apt-get update - # sudo apt-get -y install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # git submodule update --init tools/boostdep - # python3 tools/boostdep/depinst/depinst.py $LIBRARY - # python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary - # ./bootstrap.sh - # ./b2 -d0 headers - - # - name: Create user-config.jam - # if: matrix.compiler - # run: | - # echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - - # - name: Run tests - # run: | - # cd ../boost-root - # ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release - - # windows: - # strategy: - # fail-fast: false - # matrix: - # include: - # # msvc-14.0 not included, because it fails with "compiler is out of heap space" - # - toolset: msvc-14.2 - # cxxstd: "14,17,20,latest" - # addrmd: 32,64 - # os: windows-2019 - # - toolset: msvc-14.3 - # cxxstd: "14,17,20,latest" - # addrmd: 32,64 - # os: windows-2022 - # - toolset: clang-win - # cxxstd: "14,17,latest" - # addrmd: 32,64 - # os: windows-2022 - # - toolset: gcc - # cxxstd: "03,11,14,17,2a" - # addrmd: 64 - # os: windows-2019 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - # cmd /c bootstrap - # b2 -d0 headers - - # - name: Run tests - # shell: cmd - # run: | - # cd ../boost-root - # b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker - - # posix-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Use library with add_subdirectory - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # posix-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. - - # - name: Install - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install - - # - name: Use the installed library - # run: | - # cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # posix-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Setup Boost - # run: | - # echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - # LIBRARY=${GITHUB_REPOSITORY#*/} - # echo LIBRARY: $LIBRARY - # echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - # echo GITHUB_BASE_REF: $GITHUB_BASE_REF - # echo GITHUB_REF: $GITHUB_REF - # REF=${GITHUB_BASE_REF:-$GITHUB_REF} - # REF=${REF#refs/heads/} - # echo REF: $REF - # BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - # echo BOOST_BRANCH: $BOOST_BRANCH - # cd .. - # git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. - - # - name: Build tests - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests - - # - name: Run tests - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Use library with add_subdirectory - # run: | - # cd test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Configure - # run: | - # mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - - # - name: Install - # run: | - # cd __build__ - # cmake --build . --target install - - # - name: Use the installed library - # run: | - # cd test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - # cmake --build . - # ctest --output-on-failure --no-tests=error - - # standalone-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-20.04 - # - os: ubuntu-22.04 - # - os: ubuntu-24.04 - # - os: macos-13 - # - os: macos-14 - # - os: macos-15 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install packages - # if: matrix.install - # run: sudo apt install ${{matrix.install}} - - # - name: Configure - # run: | - # mkdir __build__ && cd __build__ - # cmake -DBUILD_TESTING=ON .. - - # - name: Build tests - # run: | - # cd __build__ - # cmake --build . --target tests - - # - name: Run tests - # run: | - # cd __build__ - # ctest --output-on-failure --no-tests=error - - # cuda-linux: - # runs-on: ubuntu-20.04 - - # steps: - # - uses: actions/checkout@v4 - # - uses: Jimver/cuda-toolkit@v0.2.16 - # with: - # cuda: '11.7.1' - # linux-local-args: '["--toolkit"]' - - # - name: Setup Boost - # run: | - # cd .. - # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - # git clone --depth 1 https://github.com/boostorg/config - # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - # - name: Run Tests - # run: | - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp - - # cuda-windows: - # runs-on: windows-2019 - - # steps: - # - uses: actions/checkout@v4 - # - uses: Jimver/cuda-toolkit@v0.2.16 - # - uses: ilammy/msvc-dev-cmd@v1 - - # - name: Setup Boost - # run: | - # cd .. - # git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules - # git clone --depth 1 https://github.com/boostorg/config - # git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules - - # - name: Run Tests - # shell: cmd - # run: | - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b - # nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b - - # windows-cmake-subdir: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Use library with add_subdirectory (Debug) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test - # mkdir __build__ && cd __build__ - # cmake .. - # cmake --build . --config Debug - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Use library with add_subdirectory (Release) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ - # cmake --build . --config Release - # ctest --output-on-failure --no-tests=error -C Release - - # windows-cmake-install: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # shell: cmd - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - - # - name: Install (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install --config Debug - - # - name: Install (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target install --config Release - - # - name: Use the installed library (Debug) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ - # cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. - # cmake --build . --config Debug - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Use the installed library (Release) - # shell: cmd - # run: | - # cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ - # cmake --build . --config Release - # ctest --output-on-failure --no-tests=error -C Release - - # windows-cmake-test: - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2019 - # - os: windows-2022 - - # runs-on: ${{matrix.os}} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Boost - # shell: cmd - # run: | - # echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - # for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - # echo LIBRARY: %LIBRARY% - # echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - # echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - # echo GITHUB_REF: %GITHUB_REF% - # if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - # set BOOST_BRANCH=develop - # for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - # echo BOOST_BRANCH: %BOOST_BRANCH% - # cd .. - # git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - # cd boost-root - # xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - # git submodule update --init tools/boostdep - # python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% - # python libs/mp11/tools/setup_boost_with_modules.py # Temporary - - # - name: Configure - # shell: cmd - # run: | - # cd ../boost-root - # mkdir __build__ && cd __build__ - # cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. - - # - name: Build tests (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests --config Debug - - # - name: Run tests (Debug) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error -C Debug - - # - name: Build tests (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # cmake --build . --target tests --config Release - - # - name: Run tests (Release) - # shell: cmd - # run: | - # cd ../boost-root/__build__ - # ctest --output-on-failure --no-tests=error -C Release + posix: + strategy: + fail-fast: false + matrix: + include: + - toolset: gcc-4.8 + cxxstd: "03,11" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-4.8 + - toolset: gcc-4.9 + cxxstd: "03,11" + container: ubuntu:16.04 + os: ubuntu-latest + install: g++-4.9 + - toolset: gcc-5 + cxxstd: "03,11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-5 + - toolset: gcc-6 + cxxstd: "03,11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-6 + - toolset: gcc-7 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: g++-7 + - toolset: gcc-8 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + install: g++-8 + - toolset: gcc-9 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: gcc-10 + cxxstd: "03,11,14,17,2a" + os: ubuntu-22.04 + install: g++-10 + - toolset: gcc-11 + cxxstd: "03,11,14,17,2a" + os: ubuntu-22.04 + - toolset: gcc-12 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-22.04 + install: g++-12 + - toolset: gcc-13 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-13 + - toolset: gcc-14 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-14 + - toolset: clang + compiler: clang++-3.9 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-3.9 + - toolset: clang + compiler: clang++-4.0 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-4.0 + - toolset: clang + compiler: clang++-5.0 + cxxstd: "03,11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-5.0 + - toolset: clang + compiler: clang++-6.0 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-6.0 + - toolset: clang + compiler: clang++-7 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-7 + - toolset: clang + compiler: clang++-8 + cxxstd: "03,11,14,17" + os: ubuntu-20.04 + install: clang-8 + - toolset: clang + compiler: clang++-9 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + install: clang-9 + - toolset: clang + compiler: clang++-10 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-11 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-12 + cxxstd: "03,11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-13 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-13 + - toolset: clang + compiler: clang++-14 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-14 + - toolset: clang + compiler: clang++-15 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-15 + - toolset: clang + compiler: clang++-16 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-16 + - toolset: clang + compiler: clang++-17 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-17 + - toolset: clang + compiler: clang++-18 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-18 + - toolset: clang + compiler: clang++-19 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.10 + os: ubuntu-latest + install: clang-19 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-13 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-14 + - toolset: clang + cxxstd: "03,11,14,17,20,2b" + os: macos-15 + + runs-on: ${{matrix.os}} + + container: + image: ${{matrix.container}} + volumes: + - /node20217:/node20217:rw,rshared + - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + + defaults: + run: + shell: bash + + steps: + - name: Setup container environment + if: matrix.container + run: | + apt-get update + apt-get -y install sudo python3 git g++ curl xz-utils + + - name: Install nodejs20glibc2.17 + if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} + run: | + curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz + tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + ldd /__e/node20/bin/node + + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: | + sudo apt-get update + sudo apt-get -y install ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python3 tools/boostdep/depinst/depinst.py $LIBRARY + python3 libs/mp11/tools/setup_boost_with_modules.py # Temporary + ./bootstrap.sh + ./b2 -d0 headers + + - name: Create user-config.jam + if: matrix.compiler + run: | + echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + + - name: Run tests + run: | + cd ../boost-root + ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release + + windows: + strategy: + fail-fast: false + matrix: + include: + # msvc-14.0 not included, because it fails with "compiler is out of heap space" + - toolset: msvc-14.2 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2019 + - toolset: msvc-14.3 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: clang-win + cxxstd: "14,17,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: gcc + cxxstd: "03,11,14,17,2a" + addrmd: 64 + os: windows-2019 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + cmd /c bootstrap + b2 -d0 headers + + - name: Run tests + shell: cmd + run: | + cd ../boost-root + b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + + posix-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Use library with add_subdirectory + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake .. + cmake --build . + ctest --output-on-failure --no-tests=error + + posix-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local .. + + - name: Install + run: | + cd ../boost-root/__build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + cmake --build . + ctest --output-on-failure --no-tests=error + + posix-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON .. + + - name: Build tests + run: | + cd ../boost-root/__build__ + cmake --build . --target tests + + - name: Run tests + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error + + standalone-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Use library with add_subdirectory + run: | + cd test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake .. + cmake --build . + ctest --output-on-failure --no-tests=error + + standalone-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Configure + run: | + mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + + - name: Install + run: | + cd __build__ + cmake --build . --target install + + - name: Use the installed library + run: | + cd test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + cmake --build . + ctest --output-on-failure --no-tests=error + + standalone-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-22.04 + - os: ubuntu-24.04 + - os: macos-13 + - os: macos-14 + - os: macos-15 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + if: matrix.install + run: sudo apt install ${{matrix.install}} + + - name: Configure + run: | + mkdir __build__ && cd __build__ + cmake -DBUILD_TESTING=ON .. + + - name: Build tests + run: | + cd __build__ + cmake --build . --target tests + + - name: Run tests + run: | + cd __build__ + ctest --output-on-failure --no-tests=error + + cuda-linux: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + - uses: Jimver/cuda-toolkit@v0.2.16 + with: + cuda: '11.7.1' + linux-local-args: '["--toolkit"]' + + - name: Setup Boost + run: | + cd .. + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + git clone --depth 1 https://github.com/boostorg/config + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + - name: Run Tests + run: | + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp11.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_all.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_any.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++11 -c test/mp_count_if.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++14 -c test/mp_count_if.cpp + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -std=c++17 -c test/mp_count_if.cpp + + cuda-windows: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v4 + - uses: Jimver/cuda-toolkit@v0.2.16 + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Setup Boost + run: | + cd .. + git clone --depth 1 https://github.com/anarthal/assert -b feature/cxx20-modules + git clone --depth 1 https://github.com/boostorg/config + git clone --depth 1 https://github.com/anarthal/core -b feature/cxx20-modules + + - name: Run Tests + shell: cmd + run: | + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp11.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_all.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_any.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count.cpp || exit /b + nvcc -x cu -I ./include -I ../assert/include -I ../config/include -I ../core/include -c test/mp_count_if.cpp || exit /b + + windows-cmake-subdir: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Use library with add_subdirectory (Debug) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test + mkdir __build__ && cd __build__ + cmake .. + cmake --build . --config Debug + ctest --output-on-failure --no-tests=error -C Debug + + - name: Use library with add_subdirectory (Release) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__ + cmake --build . --config Release + ctest --output-on-failure --no-tests=error -C Release + + windows-cmake-install: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + shell: cmd + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + + - name: Install (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target install --config Debug + + - name: Install (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target install --config Release + + - name: Use the installed library (Debug) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__ + cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + cmake --build . --config Debug + ctest --output-on-failure --no-tests=error -C Debug + + - name: Use the installed library (Release) + shell: cmd + run: | + cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__ + cmake --build . --config Release + ctest --output-on-failure --no-tests=error -C Release + + windows-cmake-test: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2019 + - os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python libs/mp11/tools/setup_boost_with_modules.py # Temporary + + - name: Configure + shell: cmd + run: | + cd ../boost-root + mkdir __build__ && cd __build__ + cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON .. + + - name: Build tests (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target tests --config Debug + + - name: Run tests (Debug) + shell: cmd + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error -C Debug + + - name: Build tests (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + cmake --build . --target tests --config Release + + - name: Run tests (Release) + shell: cmd + run: | + cd ../boost-root/__build__ + ctest --output-on-failure --no-tests=error -C Release posix-cmake-subdir-modules: runs-on: ubuntu-latest From ea454182c1c6d6613a936f47b5236fd0d60ccaac Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sat, 11 Jan 2025 18:54:13 +0100 Subject: [PATCH 79/86] Fix standalone CMake --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddedc5c5..4f9bf6b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,9 @@ target_include_directories(boost_mp11 ${__scope} include) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + # Required to call deprecated FetchContent_Populate + cmake_policy(SET CMP0169 OLD) + # Fetch support files message(STATUS "Fetching BoostFetch.cmake") From f6cd1d709d4b208833af35bfdb02dffe4834db92 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Sun, 12 Jan 2025 14:26:04 +0100 Subject: [PATCH 80/86] Guard cmake_policy --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f9bf6b4..55cb4644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,9 @@ target_include_directories(boost_mp11 ${__scope} include) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) # Required to call deprecated FetchContent_Populate - cmake_policy(SET CMP0169 OLD) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30.0") + cmake_policy(SET CMP0169 OLD) + endif() # Fetch support files From e19dc20d7af3a6b0deb13e852d2e54eea05535eb Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Wed, 15 Jan 2025 14:42:16 +0100 Subject: [PATCH 81/86] Migrate the library to use compatibility headers --- CMakeLists.txt | 6 ------ include/boost/mp11/algorithm.hpp | 15 +++++++++++---- include/boost/mp11/bind.hpp | 13 ++++++++++--- include/boost/mp11/detail/mp_plus.hpp | 4 +--- include/boost/mp11/detail/mp_value.hpp | 4 +--- include/boost/mp11/detail/mp_with_index.hpp | 6 ++---- include/boost/mp11/detail/std/cstddef.hpp | 5 +++++ include/boost/mp11/detail/std/tuple.hpp | 5 +++++ include/boost/mp11/detail/std/type_traits.hpp | 5 +++++ include/boost/mp11/detail/std/utility.hpp | 5 +++++ include/boost/mp11/function.hpp | 13 ++++++++++--- include/boost/mp11/integer_sequence.hpp | 13 ++++++++++--- include/boost/mp11/integral.hpp | 15 +++++++++++---- include/boost/mp11/lambda.hpp | 15 +++++++++++---- include/boost/mp11/list.hpp | 13 ++++++++++--- include/boost/mp11/map.hpp | 13 ++++++++++--- include/boost/mp11/mpl.hpp | 9 +++++++++ include/boost/mp11/mpl_list.hpp | 9 +++++++++ include/boost/mp11/mpl_tuple.hpp | 13 ++++++++++--- include/boost/mp11/set.hpp | 13 ++++++++++--- include/boost/mp11/tuple.hpp | 19 +++++++++++++------ include/boost/mp11/utility.hpp | 9 +++++++++ modules/boost_mp11.cppm | 9 ++------- 23 files changed, 169 insertions(+), 62 deletions(-) create mode 100644 include/boost/mp11/detail/std/cstddef.hpp create mode 100644 include/boost/mp11/detail/std/tuple.hpp create mode 100644 include/boost/mp11/detail/std/type_traits.hpp create mode 100644 include/boost/mp11/detail/std/utility.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 55cb4644..380e181c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,12 +16,6 @@ if (BOOST_USE_MODULES) set_target_properties(boost_mp11 PROPERTIES CXX_MODULE_STD 1) target_compile_definitions(boost_mp11 PUBLIC BOOST_USE_MODULES) - # Silence warnings about includes in the purview - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(boost_mp11 PRIVATE -Wno-include-angled-in-module-purview) - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(boost_mp11 PRIVATE /wd5244) - endif() else() add_library(boost_mp11 INTERFACE) target_compile_features(boost_mp11 INTERFACE cxx_alias_templates cxx_variadic_templates cxx_decltype) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 5b54087b..b38ffa1e 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -8,6 +8,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined(BOOST_USE_MODULES) && !defined(BOOST_MP11_INTERFACE_UNIT) + +#include +import boost.mp11; + +#else + #include #include #include @@ -23,10 +30,8 @@ #include #include #include -#ifndef BOOST_USE_MODULES -#include -#include -#endif +#include +#include #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -1352,4 +1357,6 @@ template using mp_join = mp_apply +import boost.mp11; + +#else + #include #include -#ifndef BOOST_USE_MODULES -#include -#endif +#include #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -119,4 +124,6 @@ template using mp_bind_q = mp_bind; # pragma pop_macro( "I" ) #endif +#endif + #endif // #ifndef BOOST_MP11_BIND_HPP_INCLUDED diff --git a/include/boost/mp11/detail/mp_plus.hpp b/include/boost/mp11/detail/mp_plus.hpp index ded04f8a..2c6342ed 100644 --- a/include/boost/mp11/detail/mp_plus.hpp +++ b/include/boost/mp11/detail/mp_plus.hpp @@ -9,9 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include -#ifndef BOOST_USE_MODULES -#include -#endif +#include namespace boost { diff --git a/include/boost/mp11/detail/mp_value.hpp b/include/boost/mp11/detail/mp_value.hpp index bb76b074..5c53b40c 100644 --- a/include/boost/mp11/detail/mp_value.hpp +++ b/include/boost/mp11/detail/mp_value.hpp @@ -6,9 +6,7 @@ // https://www.boost.org/LICENSE_1_0.txt #include -#ifndef BOOST_USE_MODULES -#include -#endif +#include #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO) diff --git a/include/boost/mp11/detail/mp_with_index.hpp b/include/boost/mp11/detail/mp_with_index.hpp index 890c882c..bcf66ab0 100644 --- a/include/boost/mp11/detail/mp_with_index.hpp +++ b/include/boost/mp11/detail/mp_with_index.hpp @@ -10,11 +10,9 @@ #include #include -#ifndef BOOST_USE_MODULES -#include -#include +#include +#include #include -#endif #if defined( BOOST_MP11_HAS_CXX14_CONSTEXPR ) # define BOOST_MP11_CONSTEXPR14 constexpr diff --git a/include/boost/mp11/detail/std/cstddef.hpp b/include/boost/mp11/detail/std/cstddef.hpp new file mode 100644 index 00000000..c603336c --- /dev/null +++ b/include/boost/mp11/detail/std/cstddef.hpp @@ -0,0 +1,5 @@ +#ifdef BOOST_USE_MODULES +import std; +#else +#include +#endif diff --git a/include/boost/mp11/detail/std/tuple.hpp b/include/boost/mp11/detail/std/tuple.hpp new file mode 100644 index 00000000..f00b5864 --- /dev/null +++ b/include/boost/mp11/detail/std/tuple.hpp @@ -0,0 +1,5 @@ +#ifdef BOOST_USE_MODULES +import std; +#else +#include +#endif diff --git a/include/boost/mp11/detail/std/type_traits.hpp b/include/boost/mp11/detail/std/type_traits.hpp new file mode 100644 index 00000000..395429bb --- /dev/null +++ b/include/boost/mp11/detail/std/type_traits.hpp @@ -0,0 +1,5 @@ +#ifdef BOOST_USE_MODULES +import std; +#else +#include +#endif diff --git a/include/boost/mp11/detail/std/utility.hpp b/include/boost/mp11/detail/std/utility.hpp new file mode 100644 index 00000000..e023cb35 --- /dev/null +++ b/include/boost/mp11/detail/std/utility.hpp @@ -0,0 +1,5 @@ +#ifdef BOOST_USE_MODULES +import std; +#else +#include +#endif diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 598cf394..90f2dc00 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -8,6 +8,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined(BOOST_USE_MODULES) && !defined(BOOST_MP11_INTERFACE_UNIT) + +#include +import boost.mp11; + +#else + #include #include #include @@ -16,9 +23,7 @@ #include #include #include -#ifndef BOOST_USE_MODULES -#include -#endif +#include namespace boost { @@ -221,4 +226,6 @@ template using mp_max = mp_max_element, } // namespace mp11 } // namespace boost +#endif + #endif // #ifndef BOOST_MP11_FUNCTION_HPP_INCLUDED diff --git a/include/boost/mp11/integer_sequence.hpp b/include/boost/mp11/integer_sequence.hpp index a08a92f8..6dbf1478 100644 --- a/include/boost/mp11/integer_sequence.hpp +++ b/include/boost/mp11/integer_sequence.hpp @@ -8,10 +8,15 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined(BOOST_USE_MODULES) && !defined(BOOST_MP11_INTERFACE_UNIT) + #include -#ifndef BOOST_USE_MODULES -#include -#endif +import boost.mp11; + +#else + +#include +#include #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -120,4 +125,6 @@ template using index_sequence_for = make_integer_sequence +import boost.mp11; + +#else + #include #include -#ifndef BOOST_USE_MODULES -#include -#include -#endif +#include +#include #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -50,4 +55,6 @@ template using mp_size_t = std::integral_constant # pragma pop_macro( "I" ) #endif +#endif + #endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED diff --git a/include/boost/mp11/lambda.hpp b/include/boost/mp11/lambda.hpp index fe28320e..e14cc44b 100644 --- a/include/boost/mp11/lambda.hpp +++ b/include/boost/mp11/lambda.hpp @@ -8,6 +8,13 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined(BOOST_USE_MODULES) && !defined(BOOST_MP11_INTERFACE_UNIT) + +#include +import boost.mp11; + +#else + #include #if BOOST_MP11_WORKAROUND(BOOST_MP11_MSVC, <= 1800) @@ -17,10 +24,8 @@ #else #include -#ifndef BOOST_USE_MODULES -#include -#include -#endif +#include +#include #if defined(_MSC_VER) || defined(__GNUC__) # pragma push_macro( "I" ) @@ -198,4 +203,6 @@ template