Boost logo

Boost-Commit :

From: dave_at_[hidden]
Date: 2008-07-25 05:38:53


Author: dave
Date: 2008-07-25 05:38:53 EDT (Fri, 25 Jul 2008)
New Revision: 47797
URL: http://svn.boost.org/trac/boost/changeset/47797

Log:
Improve visibility of concept failure messages

Text files modified:
   trunk/boost/concept/detail/msvc.hpp | 25 +++++++++++++++++++++++--
   1 files changed, 23 insertions(+), 2 deletions(-)

Modified: trunk/boost/concept/detail/msvc.hpp
==============================================================================
--- trunk/boost/concept/detail/msvc.hpp (original)
+++ trunk/boost/concept/detail/msvc.hpp 2008-07-25 05:38:53 EDT (Fri, 25 Jul 2008)
@@ -14,6 +14,7 @@
 
 namespace boost { namespace concept {
 
+
 template <class Model>
 struct check
 {
@@ -22,7 +23,19 @@
         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
   
 namespace detail
@@ -38,7 +51,11 @@
   : mpl::if_c<
         not_satisfied<Model>::value
       , detail::constraint
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
       , check<Model>
+# else
+ , check<failed ************ Model::************>
+# endif
>::type
 {};
       
@@ -46,7 +63,11 @@
   
 template <class Model>
 struct require
- : check<Model>
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+ : check<Model>
+# else
+ : check<failed ************ 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