forked from boostorg/concept_check
vc-7.1 workarounds
[SVN r33961]
This commit is contained in:
@@ -27,11 +27,12 @@ struct check
|
|||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
// No need for a virtual function here, since evaluatiing
|
// No need for a virtual function here, since evaluating
|
||||||
// not_satisfied below will have already instantiated the
|
// not_satisfied below will have already instantiated the
|
||||||
// constraints() member.
|
// constraints() member.
|
||||||
struct constraint {};
|
struct constraint {};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Model>
|
template <class Model>
|
||||||
struct require
|
struct require
|
||||||
: mpl::if_c<
|
: mpl::if_c<
|
||||||
@@ -54,19 +55,22 @@ struct require
|
|||||||
|
|
||||||
//
|
//
|
||||||
// The iterator library sees some really strange errors unless we
|
// The iterator library sees some really strange errors unless we
|
||||||
// use partial specialization to extract the model type with
|
// do things this way.
|
||||||
// msvc-7.1
|
|
||||||
//
|
//
|
||||||
template <class Model>
|
template <class Model>
|
||||||
struct require<void(*)(Model)>
|
struct require<void(*)(Model)>
|
||||||
: require<Model>
|
{
|
||||||
{};
|
virtual void failed(Model*)
|
||||||
|
{
|
||||||
|
require<Model>();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
||||||
enum \
|
enum \
|
||||||
{ \
|
{ \
|
||||||
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
|
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
|
||||||
sizeof(::boost::concept::require<ModelFnPtr>) \
|
sizeof(::boost::concept::require<ModelFnPtr>) \
|
||||||
}
|
}
|
||||||
|
|
||||||
# else // Not vc-7.1
|
# else // Not vc-7.1
|
||||||
|
Reference in New Issue
Block a user