|
Boost-Commit : |
From: dave_at_[hidden]
Date: 2008-07-25 05:11:24
Author: dave
Date: 2008-07-25 05:11:23 EDT (Fri, 25 Jul 2008)
New Revision: 47793
URL: http://svn.boost.org/trac/boost/changeset/47793
Log:
Improve visibility of concept failure messages
Text files modified:
trunk/boost/concept/detail/general.hpp | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
Modified: trunk/boost/concept/detail/general.hpp
==============================================================================
--- trunk/boost/concept/detail/general.hpp (original)
+++ trunk/boost/concept/detail/general.hpp 2008-07-25 05:11:23 EDT (Fri, 25 Jul 2008)
@@ -29,6 +29,16 @@
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 @@
: 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>
+ : requirement<Model>
{};
+# endif
# endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk