forked from boostorg/concept_check
Improve visibility of concept failure messages
[SVN r47793]
This commit is contained in:
23
include/boost/concept/detail/general.hpp
Executable file → Normal file
23
include/boost/concept/detail/general.hpp
Executable file → Normal file
@@ -29,6 +29,16 @@ struct requirement
|
|||||||
static void failed() { ((Model*)0)->~Model(); }
|
static void failed() { ((Model*)0)->~Model(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct failed {};
|
||||||
|
|
||||||
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
|
template <class Model>
|
||||||
|
struct requirement<failed ************ Model::************>
|
||||||
|
{
|
||||||
|
static void failed() { ((Model*)0)->~Model(); }
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||||
|
|
||||||
template <class Model>
|
template <class Model>
|
||||||
@@ -42,17 +52,28 @@ struct requirement_<void(*)(Model)>
|
|||||||
: mpl::if_<
|
: mpl::if_<
|
||||||
concept::not_satisfied<Model>
|
concept::not_satisfied<Model>
|
||||||
, constraint<Model>
|
, constraint<Model>
|
||||||
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
|
, requirement<failed ************ Model::************>
|
||||||
|
# else
|
||||||
, requirement<Model>
|
, requirement<Model>
|
||||||
|
# endif
|
||||||
>::type
|
>::type
|
||||||
{};
|
{};
|
||||||
|
|
||||||
# else
|
# else
|
||||||
|
|
||||||
// For GCC-2.x, these can't have exactly the same name
|
// For GCC-2.x, these can't have exactly the same name
|
||||||
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
template <class Model>
|
template <class Model>
|
||||||
struct requirement_<void(*)(Model)>
|
struct requirement_<void(*)(Model)>
|
||||||
: requirement<Model>
|
: requirement<failed ************ Model::************>
|
||||||
{};
|
{};
|
||||||
|
# else
|
||||||
|
template <class Model>
|
||||||
|
struct requirement_<void(*)(Model)>
|
||||||
|
: requirement<Model>
|
||||||
|
{};
|
||||||
|
# endif
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user