diff --git a/include/boost/concept/detail/concept_def.hpp b/include/boost/concept/detail/concept_def.hpp index 56ba817..c8949c2 100755 --- a/include/boost/concept/detail/concept_def.hpp +++ b/include/boost/concept/detail/concept_def.hpp @@ -3,9 +3,10 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP # define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP -# include # include # include +# include +# include #endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP // BOOST_concept(SomeName, (p1)(p2)...(pN)) @@ -14,16 +15,21 @@ // // Also defines an equivalent SomeNameConcept for backward compatibility. // Maybe in the next release we can kill off the "Concept" suffix for good. +# define BOOST_concept(name, params) \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name; /* forward decl */ \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct BOOST_PP_CAT(name,Concept) \ + : name< BOOST_PP_SEQ_ENUM(params) > \ + { \ + BOOST_PP_CAT(name,Concept)(); /* ctor needed to satisfy gcc-3.4.4 */ \ + }; \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name + +// Helper for BOOST_concept, above. # define BOOST_CONCEPT_typename(r, ignored, index, t) \ BOOST_PP_COMMA_IF(index) typename t -# define BOOST_concept(name, params) \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename, ~, params) > \ - struct name; \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename, ~, params) > \ - struct BOOST_PP_CAT(name,Concept) : name< BOOST_PP_SEQ_ENUM(params) > \ - { BOOST_PP_CAT(name,Concept)(); }; /* ctor needed to satisfy gcc-3.4.4 */ \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename, ~, params) > \ - struct name - -