|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70226 - in sandbox/enums/boost/enums: pp scoped
From: vicente.botet_at_[hidden]
Date: 2011-03-20 15:20:08
Author: viboes
Date: 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
New Revision: 70226
URL: http://svn.boost.org/trac/boost/changeset/70226
Log:
Enums: Added PP Seq macros
Added:
sandbox/enums/boost/enums/pp/
sandbox/enums/boost/enums/pp/enum_declaration.hpp (contents, props changed)
sandbox/enums/boost/enums/pp/enumerator_definition.hpp (contents, props changed)
sandbox/enums/boost/enums/pp/enumerator_list.hpp (contents, props changed)
sandbox/enums/boost/enums/pp/namespaces.hpp (contents, props changed)
Text files modified:
sandbox/enums/boost/enums/scoped/emulation.hpp | 98 ++++++++++-----------------------------
1 files changed, 26 insertions(+), 72 deletions(-)
Added: sandbox/enums/boost/enums/pp/enum_declaration.hpp
==============================================================================
--- (empty file)
+++ sandbox/enums/boost/enums/pp/enum_declaration.hpp 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
@@ -0,0 +1,133 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// 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)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_ENUMS_PP_ENUM_DECLARATION_HPP
+#define BOOST_ENUMS_PP_ENUM_DECLARATION_HPP
+
+
+#include <boost/enums/pp/enumerator_list.hpp>
+#include <boost/enums/pp/namespaces.hpp>
+
+#include <boost/preprocessor/seq.hpp>
+//#include <boost/preprocessor.hpp>
+
+/** @file
+
+
+ @brief enum-declaration associated macros.
+
+
+ */
+
+/**
+
+ @brief Generates a enumerator_list from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - EL, the ENUMERATOR_LIST
+
+ <b>Result</b>:
+ @code
+ ID(EL[0]) [= VAL(EL[0])], ...,ID(ED[L]) [= VAL(ED[L])]
+ @endcode
+
+
+ */
+
+#define BOOST_ENUMS_ENUM_DCL_SIZE_SPE(NS_EC, EL) \
+ template <> \
+ struct size<BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC)> \
+ { \
+ static const std::size_t value; \
+ }; \
+ const std::size_t \
+ size<BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC)>::value = \
+ BOOST_PP_SEQ_SIZE(EL);
+
+
+#define BOOST_ENUMS_ENUM_DCL_POS_VAL_SPE(r, data, elem) \
+template <> \
+struct pos<data, data :: BOOST_ENUMS_ENUMERATOR_DEFINITION_ID(elem)> \
+{ \
+BOOST_STATIC_CONSTEXPR std::size_t value = r; \
+}; \
+template <> \
+struct val<data, r> \
+{ \
+BOOST_STATIC_CONSTEXPR \
+boost::enums::native_type<data>::type value = \
+data::BOOST_ENUMS_ENUMERATOR_DEFINITION_ID(elem); \
+};
+
+
+
+#if 0
+#endif
+
+#define BOOST_ENUMS_ENUM_DCL_TRAITS_SPE(NS_EC, TRAITER) \
+ template <> \
+ struct enum_traits<BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC)> \
+ : TRAITER<BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC)> \
+ {};
+
+#define BOOST_ENUMS_ENUM_DCL_SPE(NS_EC, EL, TRAITER) \
+ namespace boost { \
+ namespace enums { \
+ namespace meta { \
+ BOOST_ENUMS_ENUM_DCL_SIZE_SPE(NS_EC, EL) \
+ BOOST_PP_SEQ_FOR_EACH( \
+ BOOST_ENUMS_ENUM_DCL_POS_VAL_SPE, \
+ BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), \
+ EL \
+ ) \
+ BOOST_ENUMS_ENUM_DCL_TRAITS_SPE(NS_EC, TRAITER) \
+ } \
+ } \
+ }
+
+
+#define BOOST_ENUMS_ENUM_TYPE_DCL_CONS(NS_EC, UT, EL, TRAITER) \
+ BOOST_ENUM_NS_TYPE_START(NS_EC, UT) \
+ { \
+ BOOST_ENUMS_ENUMERATOR_LIST_GENERATE(EL) \
+ } \
+ BOOST_ENUM_NS_TYPE_CONS_END(NS_EC, UT) \
+ BOOST_ENUMS_ENUM_DCL_SPE(NS_EC, EL, TRAITER)
+
+#define BOOST_ENUMS_ENUM_TYPE_DCL_NO_CONS(NS_EC, UT, EL, TRAITER) \
+ BOOST_ENUM_NS_TYPE_START(NS_EC, UT) \
+ { \
+ BOOST_ENUMS_ENUMERATOR_LIST_GENERATE(EL) \
+ } \
+ BOOST_ENUM_NS_TYPE_NO_CONS_END(NS_EC, UT) \
+ BOOST_ENUMS_ENUM_DCL_SPE(NS_EC, EL, TRAITER)
+
+#define BOOST_ENUMS_ENUM_CLASS_DCL_CONS(NS_EC, UT, EL, TRAITER) \
+ BOOST_ENUM_NS_CLASS_START(NS_EC, UT) \
+ { \
+ BOOST_ENUMS_ENUMERATOR_LIST_GENERATE(EL) \
+ } \
+ BOOST_ENUM_NS_CLASS_CONS_END(NS_EC, UT) \
+ BOOST_ENUMS_ENUM_DCL_SPE(NS_EC, EL, TRAITER)
+
+#define BOOST_ENUMS_ENUM_CLASS_DCL_NO_CONS(NS_EC, UT, EL, TRAITER) \
+ BOOST_ENUM_NS_CLASS_START(NS_EC, UT) \
+ { \
+ BOOST_ENUMS_ENUMERATOR_LIST_GENERATE(EL) \
+ } \
+ BOOST_ENUM_NS_CLASS_NO_CONS_END(NS_EC, UT) \
+ BOOST_ENUMS_ENUM_DCL_SPE(NS_EC, EL, TRAITER)
+
+
+
+
+#endif // BOOST_ENUMS_PP_ENUMERATOR_LIST_HPP
Added: sandbox/enums/boost/enums/pp/enumerator_definition.hpp
==============================================================================
--- (empty file)
+++ sandbox/enums/boost/enums/pp/enumerator_definition.hpp 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
@@ -0,0 +1,165 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// 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)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_ENUMS_PP_ENUMERATOR_DEFINITION_HPP
+#define BOOST_ENUMS_PP_ENUMERATOR_DEFINITION_HPP
+
+
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/seq.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/comparison/greater.hpp>
+//#include <boost/preprocessor.hpp>
+
+/** @file
+
+
+ @brief ENUMERATOR_DEFINITION data type and macros.
+
+ @details
+
+
+ An ENUMERATOR_DEFINITION is a sequence legth 1, 2 or 3 where
+ - the fist element is a C++ identifier,
+ - the second is a C++ constant-expression and
+ - the 3rd a C++ string literal
+
+ <b>Examples</b>:
+ @code
+ (Red)
+ (Green)(0)
+ (Blue)(2)("Azul")
+ @endcode
+
+ All the operations are named BOOST_ENUMS_ENUMERATOR_DEFINITION_:
+ - ID : ED -> first element
+ - VAL : ED, DEF -> second element or DEF
+ - STR : ED -> third element or "ID"
+
+ */
+
+/**
+
+ @brief This macro is used to get the identifier from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - ED: the ENUMERATOR_DEFINITION
+
+ <b>Result</b>: the first element of @p ED.
+
+ */
+
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_ID(ED) \
+ BOOST_PP_SEQ_ELEM(0, ED)
+
+#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
+
+#define BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_OK(ED, DEFAULT) \
+ BOOST_PP_SEQ_ELEM(1, ED)
+
+#define BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_KO(ED, DEFAULT) \
+ DEFAULT
+
+#endif
+
+/**
+
+ @brief This macro is used to get the constant-expression from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - ED: the ENUMERATOR_DEFINITION }
+ - DEFAULT: the default value when there is no second element.
+
+ <b>Result</b>: the second element of the @p ED or @p DEFAULT.
+
+ */
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_VAL(ED,DEFAULT) \
+ BOOST_PP_IIF( \
+ BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(ED),1) \
+ , BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_OK \
+ , BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_KO \
+ )(ED,DEFAULT)
+
+#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
+
+#define BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_STR_OK(ED) \
+ BOOST_PP_SEQ_ELEM(2, ED)
+
+#define BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_STR_KO(ED) \
+ BOOST_PP_STRINGIZE(BOOST_ENUMS_ENUMERATOR_DEFINITION_ID(ED))
+
+#endif
+/**
+
+ @brief This macro is used to get the string literal from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - ED, the ENUMERATOR_DEFINITION.
+
+ <b>Result</b>: the third element of @p ED or the string representation of ED'ID.
+
+ */
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_STR(ED) \
+ BOOST_PP_IIF( \
+ BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(ED),2) \
+ , BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_OK \
+ , BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_VAL_KO \
+ )(ED)
+
+#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
+
+#define BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_ASSIGN_VAL(ED) \
+ = BOOST_PP_SEQ_ELEM(1, ED)
+
+#define BOOST_ENUMS_DETAIL_NOTHING_1(ED)
+
+
+/**
+
+ @brief This macro is used to get the constant-expression from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - ED: the ENUMERATOR_DEFINITION }
+ - DEFAULT: the default value when there is no second element.
+
+ <b>Result</b>: the second element of the @p ED or @p DEFAULT.
+
+ */
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_OPT_ASSIGN_VAL(ED) \
+ BOOST_PP_IIF( \
+ BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(ED),1) \
+ , BOOST_ENUMS_DETAIL_ENUMERATOR_DEFINITION_ASSIGN_VAL \
+ , BOOST_ENUMS_DETAIL_NOTHING_1 \
+ )(ED)
+#endif
+
+/**
+
+ @brief generates a enumerator_definition from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - ED, the ENUMERATOR_DEFINITION
+ - DEFAULT: the default value when there is no second element.
+
+ <b>Result</b>:
+ @code
+ ID(ED) [= VAL(ED)]
+ @endcode
+
+ <b>Note</b>: The optional part is generated if there is a second element.
+
+ */
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_CPP_ENUMERATOR_DEFINITION(ED) \
+ BOOST_ENUMS_ENUMERATOR_DEFINITION_ID(ED) \
+ BOOST_ENUMS_ENUMERATOR_DEFINITION_OPT_ASSIGN_VAL(ED)
+
+#endif // BOOST_ENUMS_PP_ENUMERATOR_DEFINITION_HPP
Added: sandbox/enums/boost/enums/pp/enumerator_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/enums/boost/enums/pp/enumerator_list.hpp 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
@@ -0,0 +1,65 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// 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)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_ENUMS_PP_ENUMERATOR_LIST_HPP
+#define BOOST_ENUMS_PP_ENUMERATOR_LIST_HPP
+
+
+#include <boost/preprocessor/seq.hpp>
+#include <boost/enums/pp/enumerator_definition.hpp>
+
+#include <boost/preprocessor.hpp>
+
+/** @file
+
+
+ @brief ENUMERATOR_LIST data type and macros.
+
+ @details
+
+
+ An ENUMERATOR_LIST is a variable sequence of ENUMERATOR_DEFINITION having a size > 0.
+
+ <b>Example</b>:
+ @code
+ ( (Red) )
+ ( (Green)(0) )
+ ( (Blue)(2)("Azul") )
+ @endcode
+
+ All the operations are named BOOST_ENUMS_ENUMERATOR_LIST_.
+
+ */
+
+/**
+
+ @brief Generates a enumerator_list from a ENUMERATOR_DEFINITION.
+
+ <b>Parameters</b>:
+ - EL, the ENUMERATOR_LIST
+
+ <b>Result</b>:
+ @code
+ ID(EL[0]) [= VAL(EL[0])], ...,ID(ED[L]) [= VAL(ED[L])]
+ @endcode
+
+
+ */
+
+#define BOOST_ENUMS_ENUMERATOR_DEFINITION_CPP_COMMA_ENUMERATOR_DEFINITION(r, data, elem) \
+ , BOOST_ENUMS_ENUMERATOR_DEFINITION_CPP_ENUMERATOR_DEFINITION(elem)
+
+#define BOOST_ENUMS_ENUMERATOR_LIST_GENERATE(EL) \
+ BOOST_ENUMS_ENUMERATOR_DEFINITION_CPP_ENUMERATOR_DEFINITION(BOOST_PP_SEQ_ELEM(0,EL)) \
+ BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_ENUMERATOR_DEFINITION_CPP_COMMA_ENUMERATOR_DEFINITION,~,BOOST_PP_SEQ_POP_FRONT(EL))
+
+#endif // BOOST_ENUMS_PP_ENUMERATOR_LIST_HPP
Added: sandbox/enums/boost/enums/pp/namespaces.hpp
==============================================================================
--- (empty file)
+++ sandbox/enums/boost/enums/pp/namespaces.hpp 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
@@ -0,0 +1,71 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// 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)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_ENUMS_PP_NAMESPACES_HPP
+#define BOOST_ENUMS_PP_NAMESPACES_HPP
+
+#include <boost/preprocessor/if.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/seq.hpp>
+#include <boost/preprocessor/dec.hpp>
+//#include <boost/preprocessor.hpp>
+
+
+// (NS1) ... (NSn) (ENUM)
+// ==>
+// (NS1) ... (NSn)
+
+#define BOOST_ENUMS_NAMESPACES_CLASS_NS(SEQ) \
+ BOOST_PP_SEQ_POP_BACK(SEQ)
+
+
+// (NS1) ... (NSn) (ENUM)
+// ==>
+// ENUM
+
+#define BOOST_ENUMS_NAMESPACES_CLASS_ENUM(SEQ) \
+ BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(SEQ)), SEQ)
+
+// (NS1) ... (NSn)
+// ==>
+// namespace NS1 { ... namespace NSn {
+
+#define BOOST_ENUMS_NAMESPACES_OPEN_(r, data, elem) namespace elem {
+
+#define BOOST_ENUMS_NAMESPACES_OPEN(SEQ) \
+ BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_NAMESPACES_OPEN_, ~, SEQ)
+
+
+// (NS1) ... (NSn)
+// ==>
+// } ... }
+
+#define BOOST_ENUMS_NAMESPACES_CLOSE_(r, data, elem) }
+#define BOOST_ENUMS_NAMESPACES_CLOSE(SEQ) \
+ BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_NAMESPACES_CLOSE_, ~, SEQ)
+
+// (NS1) ... (NSn)
+// ==>
+// NS1::...NSn::
+
+#define BOOST_ENUMS_NAMESPACES_CLASS_QNAME_PRE_(r, data, elem) elem ::
+#define BOOST_ENUMS_NAMESPACES_CLASS_QNAME_PRE(SEQ) \
+ BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_NAMESPACES_CLASS_QNAME_PRE_, ~, SEQ)
+
+// (NS1) ... (NSn) (ENUM)
+// ==>
+// NS1::...NSn::ENUM
+
+#define BOOST_ENUMS_NAMESPACES_CLASS_QNAME(SEQ) \
+ BOOST_ENUMS_NAMESPACES_CLASS_QNAME_PRE(BOOST_ENUMS_NAMESPACES_CLASS_NS(SEQ)) BOOST_ENUMS_NAMESPACES_CLASS_ENUM(SEQ)
+
+#endif // BOOST_ENUMS_PP_NAMESPACES_HPP
Modified: sandbox/enums/boost/enums/scoped/emulation.hpp
==============================================================================
--- sandbox/enums/boost/enums/scoped/emulation.hpp (original)
+++ sandbox/enums/boost/enums/scoped/emulation.hpp 2011-03-20 15:20:07 EDT (Sun, 20 Mar 2011)
@@ -21,57 +21,11 @@
#include <boost/enums/scoped/underlying_value.hpp>
#include <boost/enums/scoped/is_enum.hpp>
#include <boost/conversion/convert_to.hpp>
-#include <boost/preprocessor/if.hpp>
-#include <boost/preprocessor/empty.hpp>
-#include <boost/preprocessor.hpp>
#include <boost/enums/config.hpp>
+#include <boost/enums/pp/namespaces.hpp>
#ifndef BOOST_ENUMS_DOXYGEN_INVOKED
-// macro to get the namespace par of a sequence (NS1) ... (NSn) (ENUM)
-// returns (NS1) ... (NSn)
-
-#define BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(SEQ) \
- BOOST_PP_SEQ_POP_BACK(SEQ)
-
-
-// macro to get the namespace par of a sequence (NS1) ... (NSn) (ENUM)
-// returns ENUM
-
-#define BOOST_ENUMS_DETAIL_ENUM(SEQ) \
- BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(SEQ)), SEQ)
-
-// macro to generate the following code from a sequence (NS1) ... (NSn)
-// namespace NS1 {
-// ...
-// namespace NSn {
-
-#define BOOST_ENUMS_DETAIL_NAMESPACE_OPEN_(r, data, elem) namespace elem {
-
-#define BOOST_ENUMS_DETAIL_NAMESPACE_OPEN(SEQ) \
- BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_DETAIL_NAMESPACE_OPEN_, ~, SEQ)
-
-
-// macro to generate the following code from a sequence (NS1) ... (NSn)
-// }
-// ...
-// }
-
-#define BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE_(r, data, elem) }
-#define BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(SEQ) \
- BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE_, ~, SEQ)
-
-// macro to generate the following code from a sequence (NS1) ... (NSn)
-// NS1::...NSn::
-
-#define BOOST_ENUMS_DETAIL_NAMESPACE_(r, data, elem) elem ::
-#define BOOST_ENUMS_DETAIL_NAMESPACE(SEQ) \
-BOOST_PP_SEQ_FOR_EACH(BOOST_ENUMS_DETAIL_NAMESPACE_, ~, SEQ)
-
-#define BOOST_ENUMS_DETAIL_CLASS(SEQ) \
- BOOST_ENUMS_DETAIL_NAMESPACE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(SEQ)) BOOST_ENUMS_DETAIL_ENUM(SEQ)
-
-
#ifndef BOOST_NO_SCOPED_ENUMS
#define BOOST_ENUMS_DETAIL_BINARY_OPERATOR(EC, UT, OP) \
inline BOOST_CONSTEXPR bool operator OP(EC lhs, EC rhs) { \
@@ -84,13 +38,13 @@
#define BOOST_ENUMS_DETAIL_BINARY_OPERATOR(EC, UT, OP) \
friend inline BOOST_CONSTEXPR bool operator OP(EC lhs, EC rhs) { \
- return lhs.native_value() OP rhs.native_value(); \
+ return lhs.native_value() OP rhs.native_value(); \
} \
friend inline BOOST_CONSTEXPR bool operator OP(type lhs, EC rhs) { \
- return lhs OP rhs.native_value(); \
+ return lhs OP rhs.native_value(); \
} \
friend inline BOOST_CONSTEXPR bool operator OP(EC lhs, type rhs) { \
- return lhs.native_value() OP rhs; \
+ return lhs.native_value() OP rhs; \
}
#endif // BOOST_NO_SCOPED_ENUMS
@@ -358,43 +312,43 @@
BOOST_ENUMS_DETAIL_IS_ENUM_TYPE_SPEC(EC)
#define BOOST_ENUM_NS_CLASS_START(NS_EC, UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_OPEN(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUM_CLASS_START(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT)
+ BOOST_ENUMS_NAMESPACES_OPEN(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUM_CLASS_START(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT)
#define BOOST_ENUM_NS_TYPE_START(NS_EC, UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_OPEN(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUM_TYPE_START(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT)
+ BOOST_ENUMS_NAMESPACES_OPEN(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUM_TYPE_START(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT)
#define BOOST_ENUM_NS_CLASS_END(NS_EC, UT) \
- BOOST_ENUM_CLASS_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_CLASS_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#define BOOST_ENUM_NS_TYPE_END(NS_EC, UT) \
- BOOST_ENUM_TYPE_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_TYPE_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#define BOOST_ENUM_NS_CLASS_NO_CONS_END(NS_EC, UT) \
- BOOST_ENUM_CLASS_NO_CONS_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_CLASS_NO_CONS_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#define BOOST_ENUM_NS_TYPE_NO_CONS_END(NS_EC, UT) \
- BOOST_ENUM_TYPE_NO_CONS_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_TYPE_NO_CONS_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#define BOOST_ENUM_NS_CLASS_CONS_END(NS_EC, UT) \
- BOOST_ENUM_CLASS_CONS_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_CLASS_CONS_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#define BOOST_ENUM_NS_TYPE_CONS_END(NS_EC, UT) \
- BOOST_ENUM_TYPE_CONS_END(BOOST_ENUMS_DETAIL_ENUM(NS_EC), UT) \
- BOOST_ENUMS_DETAIL_NAMESPACE_CLOSE(BOOST_ENUMS_DETAIL_NAMESPACE_SEQ(NS_EC)) \
- BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_DETAIL_CLASS(NS_EC), UT)
+ BOOST_ENUM_TYPE_CONS_END(BOOST_ENUMS_NAMESPACES_CLASS_ENUM(NS_EC), UT) \
+ BOOST_ENUMS_NAMESPACES_CLOSE(BOOST_ENUMS_NAMESPACES_CLASS_NS(NS_EC)) \
+ BOOST_ENUMS_SPECIALIZATIONS(BOOST_ENUMS_NAMESPACES_CLASS_QNAME(NS_EC), UT)
#endif // BOOST_ENUMS_SCOPED_EMULATION_HPP
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk