mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-05 15:54:39 +02:00
Workaround for EDG bug; improves encapsulation
[SVN r21487]
This commit is contained in:
@@ -33,23 +33,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 > \
|
||||||
boost::mpl::aux::yes_tag \
|
|
||||||
trait##_helper( \
|
|
||||||
boost::mpl::aux::type_wrapper<T> const volatile* \
|
|
||||||
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME T::name>* = 0 \
|
|
||||||
); \
|
|
||||||
\
|
|
||||||
boost::mpl::aux::no_tag \
|
|
||||||
trait##_helper(...); \
|
|
||||||
\
|
|
||||||
template< typename T > \
|
|
||||||
struct trait \
|
struct trait \
|
||||||
{ \
|
{ \
|
||||||
|
template< typename U > \
|
||||||
|
static boost::mpl::aux::yes_tag \
|
||||||
|
helper( \
|
||||||
|
boost::mpl::aux::type_wrapper<U> const volatile* \
|
||||||
|
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
static boost::mpl::aux::no_tag \
|
||||||
|
helper(...); \
|
||||||
|
\
|
||||||
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
||||||
BOOST_STATIC_CONSTANT(bool, value = \
|
\
|
||||||
sizeof((trait##_helper)(static_cast<t_*>(0))) \
|
BOOST_STATIC_CONSTANT( \
|
||||||
== sizeof(boost::mpl::aux::yes_tag) \
|
bool, value = \
|
||||||
); \
|
sizeof(trait<T>::helper(static_cast<t_*>(0))) \
|
||||||
|
== sizeof(boost::mpl::aux::yes_tag) \
|
||||||
|
); \
|
||||||
}; \
|
}; \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user