diff --git a/include/boost/mp11/list.hpp b/include/boost/mp11/list.hpp index 216d8c4..db57d65 100644 --- a/include/boost/mp11/list.hpp +++ b/include/boost/mp11/list.hpp @@ -1,7 +1,7 @@ #ifndef BOOST_MP11_LIST_HPP_INCLUDED #define BOOST_MP11_LIST_HPP_INCLUDED -// Copyright 2015 Peter Dimov. +// Copyright 2015-2017 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // @@ -10,6 +10,8 @@ #include #include +#include +#include namespace boost { @@ -166,6 +168,28 @@ template class L1, class... T1, template class L2, using type = typename mp_append_impl, Lr...>::type; }; +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 ) +#else + +template< + template class L1, class... T1, + template class L2, class... T2, + template class L3, class... T3, + template class L4, class... T4, + template class L5, class... T5, + template class L6, class... T6, + template class L7, class... T7, + template class L8, class... T8, + template class L9, class... T9, + template class L10, class... T10, + class... Lr> + struct mp_append_impl, L2, L3, L4, L5, L6, L7, L8, L9, L10, Lr...> +{ + using type = typename mp_append_impl, Lr...>::type; +}; + +#endif + } // namespace detail template using mp_append = typename detail::mp_append_impl::type; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 8819294..4f68b59 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -25,6 +25,7 @@ run mp_push_front.cpp : : : $(REQ) ; run mp_push_back.cpp : : : $(REQ) ; run mp_rename.cpp : : : $(REQ) ; run mp_append.cpp : : : $(REQ) ; +run mp_append_2.cpp : : : $(REQ) ; run mp_replace_front.cpp : : : $(REQ) ; run mp_replace_second.cpp : : : $(REQ) ; run mp_replace_third.cpp : : : $(REQ) ; diff --git a/test/mp_append_2.cpp b/test/mp_append_2.cpp new file mode 100644 index 0000000..e8de105 --- /dev/null +++ b/test/mp_append_2.cpp @@ -0,0 +1,35 @@ + +// Copyright 2015 Peter Dimov. +// +// 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 + + +#include +#include +#include +#include +#include +#include + +int main() +{ + using boost::mp11::mp_list; + using boost::mp11::mp_append; + using boost::mp11::mp_iota_c; + using boost::mp11::mp_transform; + using boost::mp11::mp_rename; + + using L1 = mp_iota_c<97>; + using L2 = mp_transform; + + using L3 = mp_rename; + + BOOST_TEST_TRAIT_TRUE((std::is_same)); + + // + + return boost::report_errors(); +}