Skip to content

Commit 28929d9

Browse files
committed
kept old impl for msvc 12.0
1 parent c2bc978 commit 28929d9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

include/boost/mp11/set.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <boost/mp11/utility.hpp>
1212
#include <boost/mp11/function.hpp>
13+
#include <boost/mp11/detail/config.hpp>
1314
#include <boost/mp11/detail/mp_list.hpp>
1415
#include <boost/mp11/detail/mp_append.hpp>
1516
#include <boost/mp11/detail/mp_copy_if.hpp>
@@ -95,6 +96,8 @@ template<class S, class... T> using mp_set_push_front = typename detail::mp_set_
9596
namespace detail
9697
{
9798

99+
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
100+
98101
struct mp_is_set_helper_start
99102
{
100103
static constexpr bool value = true;
@@ -119,6 +122,20 @@ template<template<class...> class L, class... T> struct mp_is_set_impl<L<T...>>
119122
using type = mp_bool<mp_fold<mp_list<T...>, detail::mp_is_set_helper_start, detail::mp_is_set_helper>::value>;
120123
};
121124

125+
#else
126+
127+
template<class S> struct mp_is_set_impl
128+
{
129+
using type = mp_false;
130+
};
131+
132+
template<template<class...> class L, class... T> struct mp_is_set_impl<L<T...>>
133+
{
134+
using type = mp_to_bool<std::is_same<mp_list<T...>, mp_set_push_back<mp_list<>, T...> > >;
135+
};
136+
137+
#endif // !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
138+
122139
} // namespace detail
123140

124141
template<class S> using mp_is_set = typename detail::mp_is_set_impl<S>::type;

0 commit comments

Comments
 (0)