From 63c674c575390fb4ff11b6b67a53359a719acf72 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 25 Jul 2008 09:38:53 +0000 Subject: [PATCH] Improve visibility of concept failure messages [SVN r47797] --- include/boost/concept/detail/msvc.hpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) mode change 100755 => 100644 include/boost/concept/detail/msvc.hpp diff --git a/include/boost/concept/detail/msvc.hpp b/include/boost/concept/detail/msvc.hpp old mode 100755 new mode 100644 index 3aadb79..d71d91b --- a/include/boost/concept/detail/msvc.hpp +++ b/include/boost/concept/detail/msvc.hpp @@ -14,6 +14,7 @@ namespace boost { namespace concept { + template struct check { @@ -22,7 +23,19 @@ struct check x->~Model(); } }; - + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +struct failed {}; +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; +# endif + # ifdef BOOST_OLD_CONCEPT_SUPPORT namespace detail @@ -38,7 +51,11 @@ struct require : mpl::if_c< not_satisfied::value , detail::constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION , check +# else + , check +# endif >::type {}; @@ -46,7 +63,11 @@ struct require template struct require - : check +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + : check +# else + : check +# endif {}; # endif