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