mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-05 15:54:39 +02:00
fix Boost.Python ICEs
[SVN r25174]
This commit is contained in:
@@ -14,11 +14,15 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/if.hpp>
|
||||||
#include <boost/mpl/bool.hpp>
|
#include <boost/mpl/bool.hpp>
|
||||||
#include <boost/mpl/aux_/type_wrapper.hpp>
|
#include <boost/mpl/aux_/type_wrapper.hpp>
|
||||||
#include <boost/mpl/aux_/yes_no.hpp>
|
#include <boost/mpl/aux_/yes_no.hpp>
|
||||||
#include <boost/mpl/aux_/adl_barrier.hpp>
|
#include <boost/mpl/aux_/adl_barrier.hpp>
|
||||||
|
|
||||||
|
#include <boost/type_traits/is_reference.hpp>
|
||||||
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||||
|
|
||||||
namespace aux {
|
namespace aux {
|
||||||
@@ -31,7 +35,7 @@ template< typename T > struct is_class_helper
|
|||||||
// MSVC 6.x-specific lightweight 'is_class' implementation;
|
// MSVC 6.x-specific lightweight 'is_class' implementation;
|
||||||
// Distinguishing feature: does not instantiate the type being tested.
|
// Distinguishing feature: does not instantiate the type being tested.
|
||||||
template< typename T >
|
template< typename T >
|
||||||
struct msvc_is_class
|
struct msvc_is_class_impl
|
||||||
{
|
{
|
||||||
template< typename U>
|
template< typename U>
|
||||||
static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
|
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;
|
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
|
} // namespace aux
|
||||||
|
|
||||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||||
|
Reference in New Issue
Block a user