forked from boostorg/concept_check
Killed off "Concept" suffixes on Boost concepts. Maintained
back-compatibility by using a macro to define XxxxConcept when defining Xxxxx. [SVN r33894]
This commit is contained in:
1 parent
f00741c14f
commit
79017f985a
14 files changed
+407
-413
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// 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 <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/seq/for_each_i.hpp>
|
||||
# include <boost/preprocessor/seq/enum.hpp>
|
||||
#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
|
||||
|
||||
// BOOST_concept(SomeName, (p1)(p2)...(pN))
|
||||
//
|
||||
// Expands to "template <class p1, class p2, ...class pN> struct SomeName"
|
||||
//
|
||||
// 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_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
|
||||
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
# undef BOOST_concept_typename
|
||||
# undef BOOST_concept
|
||||
+296
-341
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user