forked from boostorg/concept_check
Improve visibility of concept failure messages
[SVN r47797]
This commit is contained in:
25
include/boost/concept/detail/msvc.hpp
Executable file → Normal file
25
include/boost/concept/detail/msvc.hpp
Executable file → Normal file
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
namespace boost { namespace concept {
|
namespace boost { namespace concept {
|
||||||
|
|
||||||
|
|
||||||
template <class Model>
|
template <class Model>
|
||||||
struct check
|
struct check
|
||||||
{
|
{
|
||||||
@@ -22,7 +23,19 @@ struct check
|
|||||||
x->~Model();
|
x->~Model();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
|
struct failed {};
|
||||||
|
template <class Model>
|
||||||
|
struct check<failed ************ Model::************>
|
||||||
|
{
|
||||||
|
virtual void failed(Model* x)
|
||||||
|
{
|
||||||
|
x->~Model();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
@@ -38,7 +51,11 @@ struct require
|
|||||||
: mpl::if_c<
|
: mpl::if_c<
|
||||||
not_satisfied<Model>::value
|
not_satisfied<Model>::value
|
||||||
, detail::constraint
|
, detail::constraint
|
||||||
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
, check<Model>
|
, check<Model>
|
||||||
|
# else
|
||||||
|
, check<failed ************ Model::************>
|
||||||
|
# endif
|
||||||
>::type
|
>::type
|
||||||
{};
|
{};
|
||||||
|
|
||||||
@@ -46,7 +63,11 @@ struct require
|
|||||||
|
|
||||||
template <class Model>
|
template <class Model>
|
||||||
struct require
|
struct require
|
||||||
: check<Model>
|
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||||
|
: check<Model>
|
||||||
|
# else
|
||||||
|
: check<failed ************ Model::************>
|
||||||
|
# endif
|
||||||
{};
|
{};
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
Reference in New Issue
Block a user