From b3fc10803fe07996725f658fa151c23cb3010d98 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 25 Jul 2008 09:11:23 +0000 Subject: [PATCH] Improve visibility of concept failure messages [SVN r47793] --- include/boost/concept/detail/general.hpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) mode change 100755 => 100644 include/boost/concept/detail/general.hpp diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp old mode 100755 new mode 100644 index f36f9c4..14f1567 --- a/include/boost/concept/detail/general.hpp +++ b/include/boost/concept/detail/general.hpp @@ -29,6 +29,16 @@ struct requirement static void failed() { ((Model*)0)->~Model(); } }; +struct failed {}; + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; +# endif + # ifdef BOOST_OLD_CONCEPT_SUPPORT template @@ -42,17 +52,28 @@ struct requirement_ : mpl::if_< concept::not_satisfied , constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + , requirement +# else , requirement +# endif >::type {}; # else // For GCC-2.x, these can't have exactly the same name +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION template struct requirement_ - : requirement + : requirement {}; +# else +template +struct requirement_ + : requirement +{}; +# endif # endif