Improve visibility of concept failure messages

[SVN r47793]
This commit is contained in:
Dave Abrahams
2008-07-25 09:11:23 +00:00
parent cc5dcdfb33
commit b3fc10803f

23
include/boost/concept/detail/general.hpp Executable file → Normal file
View 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<Model>
: requirement<failed ************ Model::************>
{};
# else
template <class Model>
struct requirement_<void(*)(Model)>
: requirement<Model>
{};
# endif
# endif