diff --git a/doc/reference/recursive_variant.xml b/doc/reference/recursive_variant.xml
index 4392bf2a..486fc39c 100644
--- a/doc/reference/recursive_variant.xml
+++ b/doc/reference/recursive_variant.xml
@@ -104,11 +104,6 @@
Sequence
must meet the requirements of
MPL's Sequence
concept.
- Due to standard conformance problems in several compilers,
- make_recursive_variant_over
may not be supported on
- your compiler. See
- BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
- for more information.
diff --git a/doc/reference/variant.xml b/doc/reference/variant.xml
index ba67fbea..5dfdbec8 100644
--- a/doc/reference/variant.xml
+++ b/doc/reference/variant.xml
@@ -951,11 +951,6 @@
Sequence
must meet the requirements of
MPL's Sequence
concept.
- Due to standard conformance problems in several compilers,
- make_variant_over
may not be supported on your
- compiler. See
- BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
- for more information.
diff --git a/doc/reference/variant_fwd.xml b/doc/reference/variant_fwd.xml
index eb66af20..47d4b2e3 100644
--- a/doc/reference/variant_fwd.xml
+++ b/doc/reference/variant_fwd.xml
@@ -91,21 +91,6 @@
-
-
- Indicates absence of support for specifying the bounded types
- of a variant
by the elements of a
- type sequence.
-
-
-
- Defined only if
- make_variant_over
and
- make_recursive_variant_over
- are not supported for some reason on the target compiler.
-
-
-
Define this macro if you do not wish to have a std::hash
specialization for
diff --git a/doc/tutorial/advanced.xml b/doc/tutorial/advanced.xml
index bd5daef4..d9400638 100644
--- a/doc/tutorial/advanced.xml
+++ b/doc/tutorial/advanced.xml
@@ -90,13 +90,6 @@ typedef mpl::push_front< types_initial, int >::type
- Portability: Unfortunately, due to
- standard conformance issues in several compilers,
- make_variant_over
is not universally available. On these
- compilers the library indicates its lack of support for the syntax via the
- definition of the preprocessor symbol
- BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
.
-
diff --git a/include/boost/variant/detail/initializer.hpp b/include/boost/variant/detail/initializer.hpp
index 4a54c273..331f375b 100644
--- a/include/boost/variant/detail/initializer.hpp
+++ b/include/boost/variant/detail/initializer.hpp
@@ -22,7 +22,6 @@
#include
#include
-#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
# include
# include
# include
@@ -30,12 +29,7 @@
# include
# include
# include
-#else
-# include
-# include
-# include
-# include
-#endif
+
namespace boost {
namespace detail { namespace variant {
@@ -53,8 +47,6 @@ namespace detail { namespace variant {
// size of the variant's psuedo-variadic template parameter list.
//
-#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-
// (detail) quoted metafunction make_initializer_node
//
// Exposes a pair whose first type is a node in the initializer hierarchy.
@@ -81,7 +73,6 @@ struct make_initializer_node
typedef typename unwrap_recursive::type
public_T;
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
typedef boost::is_reference
is_reference_content_t;
@@ -92,10 +83,6 @@ struct make_initializer_node
typedef typename boost::mpl::if_, public_T&& >::type
param2_T;
-#else
- typedef typename call_traits::param_type
- param_T;
-#endif
public: // static functions
@@ -111,7 +98,6 @@ struct make_initializer_node
return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
static int initialize(void* dest, param2_T operand)
{
// This assert must newer trigger, because all the reference contents are
@@ -122,7 +108,6 @@ struct make_initializer_node
new(dest) value_T( boost::detail::variant::move(operand) );
return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
}
-#endif
};
friend class initializer_node;
@@ -150,61 +135,6 @@ class initializer_root
};
-#else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-
- // Obsolete. Remove.
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_PARAMS \
- BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) \
- /**/
-
- // Obsolete. Remove.
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_DEFINE_PARAM_T(N) \
- typedef typename unwrap_recursive< \
- BOOST_PP_CAT(recursive_enabled_T,N) \
- >::type BOOST_PP_CAT(public_T,N); \
- typedef typename call_traits< \
- BOOST_PP_CAT(public_T,N) \
- >::param_type BOOST_PP_CAT(param_T,N); \
- /**/
-
-template < BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) >
-struct preprocessor_list_initializer
-{
-public: // static functions
-
- #define BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION(z,N,_) \
- typedef typename unwrap_recursive< \
- BOOST_PP_CAT(recursive_enabled_T,N) \
- >::type BOOST_PP_CAT(public_T,N); \
- typedef typename call_traits< \
- BOOST_PP_CAT(public_T,N) \
- >::param_type BOOST_PP_CAT(param_T,N); \
- static int initialize( \
- void* dest \
- , BOOST_PP_CAT(param_T,N) operand \
- ) \
- { \
- typedef typename boost::detail::make_reference_content< \
- BOOST_PP_CAT(recursive_enabled_T,N) \
- >::type internal_T; \
- \
- new(dest) internal_T(operand); \
- return (N); /*which*/ \
- } \
- /**/
-
- BOOST_PP_REPEAT(
- BOOST_VARIANT_LIMIT_TYPES
- , BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION
- , _
- )
-
- #undef BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION
-
-};
-
-#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
-
}} // namespace detail::variant
} // namespace boost
@@ -216,8 +146,6 @@ struct preprocessor_list_initializer
// most appropriate to the current compiler.
//
-#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-
#define BOOST_VARIANT_AUX_INITIALIZER_T( mpl_seq, typename_base ) \
::boost::mpl::iter_fold< \
mpl_seq \
@@ -231,19 +159,4 @@ struct preprocessor_list_initializer
>::type::first \
/**/
-#else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-
- // Obsolete. Remove.
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_ARGS(typename_base) \
- BOOST_VARIANT_ENUM_PARAMS(typename_base) \
- /**/
-
-#define BOOST_VARIANT_AUX_INITIALIZER_T( mpl_seq, typename_base ) \
- ::boost::detail::variant::preprocessor_list_initializer< \
- BOOST_VARIANT_ENUM_PARAMS(typename_base) \
- > \
- /**/
-
-#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
-
#endif // BOOST_VARIANT_DETAIL_INITIALIZER_HPP
diff --git a/include/boost/variant/detail/substitute.hpp b/include/boost/variant/detail/substitute.hpp
index f8c05b8a..213259d7 100644
--- a/include/boost/variant/detail/substitute.hpp
+++ b/include/boost/variant/detail/substitute.hpp
@@ -22,10 +22,7 @@
#include
#include
#include
-#include
#include
-#include
-#include
namespace boost {
namespace detail { namespace variant {
diff --git a/include/boost/variant/detail/variant_io.hpp b/include/boost/variant/detail/variant_io.hpp
index 63df74f2..9e560f4e 100644
--- a/include/boost/variant/detail/variant_io.hpp
+++ b/include/boost/variant/detail/variant_io.hpp
@@ -16,8 +16,6 @@
#include // for std::basic_ostream forward declare
#include
-
-#include
#include
namespace boost {
@@ -29,14 +27,9 @@ namespace boost {
//
// forward declare (allows output of embedded variant< variant< ... >, ... >)
-template <
- BOOST_TEMPLATED_STREAM_ARGS(E,T)
- BOOST_TEMPLATED_STREAM_COMMA
- BOOST_VARIANT_ENUM_PARAMS(typename U)
- >
-inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
- BOOST_TEMPLATED_STREAM(ostream, E,T)& out
- , const variant< BOOST_VARIANT_ENUM_PARAMS(U) >& rhs
+template
+inline std::basic_ostream& operator<<(
+ std::basic_ostream& out, const variant& rhs
);
namespace detail { namespace variant {
@@ -71,18 +64,13 @@ class printer
}} // namespace detail::variant
-template <
- BOOST_TEMPLATED_STREAM_ARGS(E,T)
- BOOST_TEMPLATED_STREAM_COMMA
- BOOST_VARIANT_ENUM_PARAMS(typename U)
- >
-inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
- BOOST_TEMPLATED_STREAM(ostream, E,T)& out
- , const variant< BOOST_VARIANT_ENUM_PARAMS(U) >& rhs
+template
+inline std::basic_ostream& operator<<(
+ std::basic_ostream& out, const variant& rhs
)
{
detail::variant::printer<
- BOOST_TEMPLATED_STREAM(ostream, E,T)
+ std::basic_ostream
> visitor(out);
rhs.apply_visitor(visitor);
diff --git a/include/boost/variant/detail/visitation_impl.hpp b/include/boost/variant/detail/visitation_impl.hpp
index 862d8398..13fa9214 100644
--- a/include/boost/variant/detail/visitation_impl.hpp
+++ b/include/boost/variant/detail/visitation_impl.hpp
@@ -53,13 +53,6 @@
#endif
-// Define a compiler generic null pointer value
-#if defined(BOOST_NO_CXX11_NULLPTR)
-#define BOOST_VARIANT_NULL 0
-#else
-#define BOOST_VARIANT_NULL nullptr
-#endif
-
namespace boost {
namespace detail { namespace variant {
@@ -179,7 +172,7 @@ inline typename Visitor::result_type
visitation_impl(
int, int, Visitor&, VPCV
, mpl::true_ // is_apply_visitor_unrolled
- , NBF, W* = BOOST_VARIANT_NULL, S* = BOOST_VARIANT_NULL
+ , NBF, W* = nullptr, S* = nullptr
)
{
// should never be here at runtime!
@@ -198,7 +191,7 @@ visitation_impl(
, Visitor& visitor, VoidPtrCV storage
, mpl::false_ // is_apply_visitor_unrolled
, NoBackupFlag no_backup_flag
- , Which* = BOOST_VARIANT_NULL, step0* = BOOST_VARIANT_NULL
+ , Which* = nullptr, step0* = nullptr
)
{
// Typedef apply_visitor_unrolled steps and associated types...
diff --git a/include/boost/variant/variant.hpp b/include/boost/variant/variant.hpp
index f65c3400..f28a0120 100644
--- a/include/boost/variant/variant.hpp
+++ b/include/boost/variant/variant.hpp
@@ -40,8 +40,6 @@
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -1096,8 +1094,6 @@ class variant
{
};
-#if !defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT)
-
private: // helpers, for typedefs (below)
typedef typename mpl::eval_if<
@@ -1141,82 +1137,6 @@ class variant
internal_types
>::type internal_T0;
-#else // defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT)
-
-private: // helpers, for typedefs (below)
-
- typedef unwrapped_T0_ T0;
-
- #define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS(z,N,_) \
- typedef typename mpl::eval_if< \
- is_recursive_ \
- , detail::variant::enable_recursive< \
- BOOST_PP_CAT(T,N) \
- , wknd_self_t \
- > \
- , mpl::identity< BOOST_PP_CAT(T,N) > \
- >::type BOOST_PP_CAT(recursive_enabled_T,N); \
- /**/
-
- BOOST_PP_REPEAT(
- BOOST_VARIANT_LIMIT_TYPES
- , BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS
- , _
- )
-
- #undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS
-
- #define BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS(z,N,_) \
- typedef typename unwrap_recursive< \
- BOOST_PP_CAT(recursive_enabled_T,N) \
- >::type BOOST_PP_CAT(public_T,N); \
- /**/
-
- BOOST_PP_REPEAT(
- BOOST_VARIANT_LIMIT_TYPES
- , BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS
- , _
- )
-
- #undef BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS
-
-public: // public typedefs
-
- typedef typename detail::variant::make_variant_list<
- BOOST_VARIANT_ENUM_PARAMS(public_T)
- >::type types;
-
-private: // helpers, for internal typedefs (below)
-
- #define BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS(z,N,_) \
- typedef detail::make_reference_content< \
- BOOST_PP_CAT(recursive_enabled_T,N) \
- >::type BOOST_PP_CAT(internal_T,N); \
- /**/
-
- BOOST_PP_REPEAT(
- BOOST_VARIANT_LIMIT_TYPES
- , BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS
- , _
- )
-
- #undef BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS
-
-private: // internal typedefs
-
- typedef typename detail::variant::make_variant_list<
- BOOST_VARIANT_ENUM_PARAMS(internal_T)
- >::type internal_types;
-
-private: // static precondition assertions
-
- // NOTE TO USER :
- // variant< type-sequence > syntax is not supported on this compiler!
- //
- BOOST_MPL_ASSERT_NOT(( is_sequence_based_ ));
-
-#endif // BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT workaround
-
private: // helpers, for representation (below)
typedef typename detail::variant::find_fallback_type<
diff --git a/include/boost/variant/variant_fwd.hpp b/include/boost/variant/variant_fwd.hpp
index eb11f428..c5f80024 100644
--- a/include/boost/variant/variant_fwd.hpp
+++ b/include/boost/variant/variant_fwd.hpp
@@ -25,15 +25,6 @@
#include
#include
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
-//
-// Defined if variant does not support make_variant_over (see below).
-//
-#if defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-# define BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
-#endif
-
///////////////////////////////////////////////////////////////////////////////
// macro BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT
//
@@ -118,40 +109,6 @@ struct convert_void< void_ >
typedef mpl::na type;
};
-///////////////////////////////////////////////////////////////////////////////
-// (workaround) BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
-//
-// Needed to work around compilers that don't support using-declaration
-// overloads. (See the variant::initializer workarounds below.)
-//
-
-#if defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-// (detail) tags voidNN -- NN defined on [0, BOOST_VARIANT_LIMIT_TYPES)
-//
-// Defines void types that are each unique and specializations of
-// convert_void that yields mpl::na for each voidNN type.
-//
-
-#define BOOST_VARIANT_DETAIL_DEFINE_VOID_N(z,N,_) \
- struct BOOST_PP_CAT(void,N); \
- \
- template <> \
- struct convert_void< BOOST_PP_CAT(void,N) > \
- { \
- typedef mpl::na type; \
- }; \
- /**/
-
-BOOST_PP_REPEAT(
- BOOST_VARIANT_LIMIT_TYPES
- , BOOST_VARIANT_DETAIL_DEFINE_VOID_N
- , _
- )
-
-#undef BOOST_VARIANT_DETAIL_DEFINE_VOID_N
-
-#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
-
}} // namespace detail::variant
#define BOOST_VARIANT_AUX_DECLARE_PARAMS BOOST_VARIANT_ENUM_PARAMS(typename T)
diff --git a/test/variant_visit_test.cpp b/test/variant_visit_test.cpp
index c3d0ddc2..c902ee36 100644
--- a/test/variant_visit_test.cpp
+++ b/test/variant_visit_test.cpp
@@ -79,7 +79,7 @@ struct rvalue_ref_decltype_visitor
#endif
template
-inline void unary_test(Variant& var, Checker* = BOOST_VARIANT_NULL)
+inline void unary_test(Variant& var, Checker* = nullptr)
{
Checker checker;
const Checker& const_checker = checker;
@@ -97,7 +97,7 @@ inline void unary_test(Variant& var, Checker* = BOOST_VARIANT_NULL)
}
template
-inline void binary_test(Variant1& var1, Variant2& var2, Checker* = BOOST_VARIANT_NULL)
+inline void binary_test(Variant1& var1, Variant2& var2, Checker* = nullptr)
{
Checker checker;
const Checker& const_checker = checker;