From fb99b2546af04e907856205628b04a41d2379dde Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 15 May 2006 13:29:23 +0000 Subject: [PATCH] Minor cleanups [SVN r33967] --- include/boost/concept/where.hpp | 17 +++++++++++++++-- include/boost/concept_check.hpp | 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/boost/concept/where.hpp b/include/boost/concept/where.hpp index eec01b7..c91c1f9 100755 --- a/include/boost/concept/where.hpp +++ b/include/boost/concept/where.hpp @@ -10,8 +10,21 @@ namespace boost { +// Template for use in handwritten assertions +template +struct where_ : More +{ +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef typename More::type type; +# endif + BOOST_CONCEPT_ASSERT((Model)); +}; + +// Template for use by macros, where models must be wrapped in parens. +// This isn't in namespace detail to keep extra cruft out of resulting +// error messages. template -struct where : More +struct _where_ : More { # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef typename More::type type; @@ -19,7 +32,7 @@ struct where : More BOOST_CONCEPT_ASSERT_FN(ModelFn); }; -#define BOOST_CONCEPT_WHERE_OPEN(r,data,t) ::boost::where #if defined(NDEBUG) || BOOST_WORKAROUND(BOOST_MSVC, < 1300) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 3b43f2c..73058dc 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -336,7 +336,6 @@ namespace boost Func f; First first; Second second; - Return r; }; BOOST_concept(UnaryPredicate,(Func)(Arg))