mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-04 15:24:29 +02:00
Fix up busted tag replacement
[SVN r21500]
This commit is contained in:
@@ -34,22 +34,25 @@
|
|||||||
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
|
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
|
||||||
template< typename T > \
|
template< typename T > \
|
||||||
struct trait \
|
struct trait \
|
||||||
|
{ \
|
||||||
|
struct helpers \
|
||||||
{ \
|
{ \
|
||||||
template< typename U > \
|
template< typename U > \
|
||||||
static boost::mpl::aux::yes_tag \
|
static boost::mpl::aux::yes_tag \
|
||||||
helper( \
|
test( \
|
||||||
boost::mpl::aux::type_wrapper<U> const volatile* \
|
boost::mpl::aux::type_wrapper<U> const volatile* \
|
||||||
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
|
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
static boost::mpl::aux::no_tag \
|
static boost::mpl::aux::no_tag \
|
||||||
helper(...); \
|
test(...); \
|
||||||
|
}; \
|
||||||
\
|
\
|
||||||
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
||||||
\
|
\
|
||||||
BOOST_STATIC_CONSTANT( \
|
BOOST_STATIC_CONSTANT( \
|
||||||
bool, value = \
|
bool, value = \
|
||||||
sizeof(trait<T>::helper(static_cast<t_*>(0))) \
|
sizeof(helpers::test(static_cast<t_*>(0))) \
|
||||||
== sizeof(boost::mpl::aux::yes_tag) \
|
== sizeof(boost::mpl::aux::yes_tag) \
|
||||||
); \
|
); \
|
||||||
}; \
|
}; \
|
||||||
|
Reference in New Issue
Block a user