mirror of
https://github.com/boostorg/variant.git
synced 2026-02-10 12:02:14 +00:00
MSVC workarounds.
[SVN r18893]
This commit is contained in:
@@ -17,7 +17,11 @@
|
||||
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
|
||||
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
|
||||
|
||||
#include "boost/variant/detail/define_forwarding_func.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
# include "boost/variant/detail/define_forwarding_func.hpp"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -45,10 +49,12 @@ namespace boost {
|
||||
} \
|
||||
/**/
|
||||
#
|
||||
BOOST_VARIANT_AUX_DEFINE_FORWARDING_FUNC(
|
||||
BOOST_VARIANT_AUX_APPLY_VISITOR_FUNC
|
||||
, 2
|
||||
)
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_VARIANT_AUX_DEFINE_FORWARDING_FUNC(BOOST_VARIANT_AUX_APPLY_VISITOR_FUNC, 2)
|
||||
#else
|
||||
BOOST_VARIANT_AUX_APPLY_VISITOR_FUNC(BOOST_VARIANT_AUX_NOTHING,BOOST_VARIANT_AUX_NOTHING)
|
||||
BOOST_VARIANT_AUX_APPLY_VISITOR_FUNC(BOOST_VARIANT_AUX_NOTHING,const)
|
||||
#endif
|
||||
#
|
||||
#undef BOOST_VARIANT_AUX_APPLY_VISITOR_FUNC
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/mpl/aux_/nested_type_wknd.hpp"
|
||||
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||
|
||||
#include "boost/aligned_storage.hpp"
|
||||
#include "boost/assert.hpp"
|
||||
@@ -123,11 +123,25 @@ private: // helpers, for metafunction result (below)
|
||||
|
||||
public: // metafunction result
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
typedef aligned_storage<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(max_size)::value
|
||||
, BOOST_MPL_AUX_NESTED_TYPE_WKND(max_alignment)::value
|
||||
BOOST_MPL_AUX_VALUE_WKND(max_size)::value
|
||||
, BOOST_MPL_AUX_VALUE_WKND(max_alignment)::value
|
||||
> type;
|
||||
|
||||
#else // MSVC7 and below
|
||||
|
||||
BOOST_STATIC_CONSTANT(std::size_t, max_size_c = max_size::value);
|
||||
BOOST_STATIC_CONSTANT(std::size_t, max_alignment_c = max_alignment::value);
|
||||
|
||||
typedef aligned_storage<
|
||||
max_size_c
|
||||
, max_alignment_c
|
||||
> type;
|
||||
|
||||
#endif // MSVC workaround
|
||||
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -445,7 +459,7 @@ private: // static precondition assertions, cont.
|
||||
));
|
||||
*/
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1300))
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
// [Assert no top-level const-qualified types:]
|
||||
BOOST_STATIC_ASSERT((
|
||||
@@ -458,7 +472,7 @@ private: // static precondition assertions, cont.
|
||||
>::type::value
|
||||
));
|
||||
|
||||
#endif // avoid on BOOST_MSVC
|
||||
#endif // avoid on MSVC7 and below
|
||||
|
||||
private: // representation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user