mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-03 06:44:37 +02:00
Workarounds for gcc-3.2
[SVN r21499]
This commit is contained in:
@@ -32,27 +32,30 @@
|
|||||||
// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
||||||
|
|
||||||
# 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 \
|
||||||
{ \
|
{ \
|
||||||
template< typename U > \
|
struct helpers \
|
||||||
static boost::mpl::aux::yes_tag \
|
{ \
|
||||||
helper( \
|
template< typename U > \
|
||||||
boost::mpl::aux::type_wrapper<U> const volatile* \
|
static boost::mpl::aux::yes_tag \
|
||||||
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
|
test( \
|
||||||
); \
|
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(...); \
|
\
|
||||||
\
|
static boost::mpl::aux::no_tag \
|
||||||
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
test(...); \
|
||||||
\
|
}; \
|
||||||
BOOST_STATIC_CONSTANT( \
|
\
|
||||||
bool, value = \
|
typedef boost::mpl::aux::type_wrapper<T> t_; \
|
||||||
sizeof(trait<T>::helper(static_cast<t_*>(0))) \
|
\
|
||||||
== sizeof(boost::mpl::aux::yes_tag) \
|
BOOST_STATIC_CONSTANT( \
|
||||||
); \
|
bool, value = \
|
||||||
}; \
|
sizeof(helpers::test(static_cast<t_*>(0))) \
|
||||||
|
== sizeof(boost::mpl::aux::yes_tag) \
|
||||||
|
); \
|
||||||
|
}; \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
# else
|
# else
|
||||||
|
Reference in New Issue
Block a user