mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-03 14:54:30 +02:00
fix Boost.Python ICEs
[SVN r25174]
This commit is contained in:
@@ -14,11 +14,15 @@
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/type_wrapper.hpp>
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/adl_barrier.hpp>
|
||||
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
namespace aux {
|
||||
@@ -31,7 +35,7 @@ template< typename T > struct is_class_helper
|
||||
// MSVC 6.x-specific lightweight 'is_class' implementation;
|
||||
// Distinguishing feature: does not instantiate the type being tested.
|
||||
template< typename T >
|
||||
struct msvc_is_class
|
||||
struct msvc_is_class_impl
|
||||
{
|
||||
template< typename U>
|
||||
static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
|
||||
@@ -41,6 +45,18 @@ struct msvc_is_class
|
||||
typedef bool_<value> type;
|
||||
};
|
||||
|
||||
// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in
|
||||
// complex metaprograms
|
||||
template< typename T >
|
||||
struct msvc_is_class
|
||||
: if_<
|
||||
is_reference<T>
|
||||
, false_
|
||||
, msvc_is_class_impl<T>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
|
Reference in New Issue
Block a user