Boost logo

Boost-Commit :

From: chochlik_at_[hidden]
Date: 2008-07-05 07:11:35


Author: matus.chochlik
Date: 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
New Revision: 47092
URL: http://svn.boost.org/trac/boost/changeset/47092

Log:
- Fixed multi-dimensional array type name building
- Added build_name(...) member function to the meta_type template
- Updated the registering/types.cpp example
- Added BOOST_MIRROR_REG_TYPE_GS as shorthand for BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE
- Added BOOST_MIRROR_REG_TYPEEF_GS and for BOOST_MIRROR_REG_TYPEDEF_GLOBAL_SCOPE for registering global scope typedefs
- Added BOOST_MIRROR_REG_TYPE_EMBEDDED and for BOOST_MIRROR_REG_TYPE_EMB for registering embedded types

Text files modified:
   sandbox/mirror/boost/mirror/detail/decorated_type_name.hpp | 173 +++++++++++++++++++++------------------
   sandbox/mirror/boost/mirror/detail/full_name_builder.hpp | 52 ++++++++---
   sandbox/mirror/boost/mirror/meta_type.hpp | 64 +++++++++++---
   sandbox/mirror/libs/mirror/doc/xml/mirror/_library.xml | 11 +
   sandbox/mirror/libs/mirror/example/registering/types.cpp | 73 +++++++++-------
   5 files changed, 228 insertions(+), 145 deletions(-)

Modified: sandbox/mirror/boost/mirror/detail/decorated_type_name.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/detail/decorated_type_name.hpp (original)
+++ sandbox/mirror/boost/mirror/detail/decorated_type_name.hpp 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
@@ -24,28 +24,37 @@
 {
 private:
         template <bool FullName>
- inline static bstring init_name(
- mpl::bool_<FullName> _full,
- const bstring& left,
- const bstring& right
- )
+ inline static bstring init_name(mpl::bool_<FullName> full_or_base)
         {
- bstring res(Decorator::prefix());
- res.append(MetaType::get_name(_full));
- res.append(Decorator::postfix());
- return res;
+ bstring left;
+ bstring right;
+ bstring temp(build_name(full_or_base, left, right));
+ left.append(temp);
+ left.append(right);
+ return left;
         }
+
+
 public:
         template <bool FullName>
- static const bstring& get_name(
- mpl::bool_<FullName> _full,
- const bstring& left = bstring(),
- const bstring& right = bstring()
+ inline static bstring build_name(
+ mpl::bool_<FullName> full_or_base,
+ bstring& left,
+ bstring& right
         )
         {
- static bstring s_name(
- init_name(_full, left, right)
+ Decorator D(left, right);
+ return MetaType::build_name(
+ full_or_base,
+ left,
+ right
                 );
+ }
+
+ template <bool FullName>
+ static const bstring& get_name(mpl::bool_<FullName> full_or_base)
+ {
+ static bstring s_name(init_name(full_or_base));
                 return s_name;
         }
 
@@ -65,106 +74,112 @@
 template <typename T>
 struct type_name_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void){return bstring();}
+ inline type_name_decorator(bstring&, bstring&);
 };
 
-// pointer decorator
-template <typename T>
-struct type_name_decorator<T*>
+struct type_name_right_postfix_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
- {
- return bstring(BOOST_STR_LIT(" *"));
- }
-};
+ inline type_name_right_postfix_decorator(bstring& _r, const bchar* _pfx)
+ : right(_r), postfix(_pfx) { }
 
-// array decorator
-template <typename T, size_t Size>
-struct type_name_decorator< T[ Size ] >
-{
-private:
- inline static bstring init_postfix(void)
- {
- typedef typename detail::static_int_to_str<Size>
- size_string;
- // init with '['
- bstring res(BOOST_STR_LIT(" ["));
- //
- // setup a buffer for the number
- const size_t max_size = size_string::length::value+1;
- bchar buffer[max_size];
- // put it into the buffer
- size_string::convert(buffer, max_size);
- // append the buffer
- res.append(bstring(buffer));
- // append ']'
- res.append(bstring(BOOST_STR_LIT("]")));
- return res;
- }
-public:
- inline static bstring prefix(void){return bstring();}
- inline static const bstring& postfix(void)
+ inline ~type_name_right_postfix_decorator(void)
         {
- static bstring s_postfix(init_postfix());
- return s_postfix;
+ right.append(bstring(postfix));
         }
+ bstring& right;
+ const bchar* postfix;
 };
 
-// array decorator
+// pointer decorator
 template <typename T>
-struct type_name_decorator< T[] >
+struct type_name_decorator<T*>
+: type_name_right_postfix_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
- {
- return bstring(BOOST_STR_LIT(" []"));
- }
+ inline type_name_decorator(bstring&, bstring& _right)
+ : type_name_right_postfix_decorator(_right, BOOST_STR_LIT(" *"))
+ { }
 };
 
 
 // reference decorator
 template <typename T>
 struct type_name_decorator<T&>
+: type_name_right_postfix_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
- {
- return bstring(BOOST_STR_LIT(" &"));
- }
+ inline type_name_decorator(bstring&, bstring& _right)
+ : type_name_right_postfix_decorator(_right, BOOST_STR_LIT(" &"))
+ { }
 };
 
 // const type decorator
 template <typename T>
 struct type_name_decorator<const T>
+: type_name_right_postfix_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
- {
- return bstring(BOOST_STR_LIT(" const"));
- }
+ inline type_name_decorator(bstring&, bstring& _right)
+ : type_name_right_postfix_decorator(_right, BOOST_STR_LIT(" const"))
+ { }
 };
 
 // volatile type decorator
 template <typename T>
 struct type_name_decorator<volatile T>
+: type_name_right_postfix_decorator
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
- {
- return bstring(BOOST_STR_LIT(" volatile"));
- }
+ inline type_name_decorator(bstring&, bstring& _right)
+ : type_name_right_postfix_decorator(_right, BOOST_STR_LIT(" volatile"))
+ { }
 };
 
 // const volatile type decorator
 template <typename T>
 struct type_name_decorator<const volatile T>
+: type_name_right_postfix_decorator
+{
+ inline type_name_decorator(bstring&, bstring& _r)
+ : type_name_right_postfix_decorator(_r, BOOST_STR_LIT(" const volatile"))
+ { }
+};
+
+// array decorator
+template <typename T>
+struct type_name_decorator< T[] >
 {
- inline static bstring prefix(void){return bstring();}
- inline static bstring postfix(void)
+ inline type_name_decorator(bstring&, bstring& _right)
         {
- return bstring(BOOST_STR_LIT(" const volatile"));
+ _right.append(BOOST_STR_LIT(" []"));
+ }
+};
+
+
+// array decorator
+template <typename T, size_t Size>
+struct type_name_decorator< T[ Size ] >
+{
+private:
+ inline static bstring init_postfix(void)
+ {
+ typedef typename detail::static_int_to_str<Size>
+ size_string;
+ // init with '['
+ bstring res(BOOST_STR_LIT(" ["));
+ //
+ // setup a buffer for the number
+ const size_t max_size = size_string::length::value+1;
+ bchar buffer[max_size];
+ // put it into the buffer
+ size_string::convert(buffer, max_size);
+ // append the buffer
+ res.append(bstring(buffer));
+ // append ']'
+ res.append(bstring(BOOST_STR_LIT("]")));
+ return res;
+ }
+public:
+ inline type_name_decorator(bstring&, bstring& _right)
+ {
+ static bstring s_postfix(init_postfix());
+ _right.append(s_postfix);
         }
 };
 

Modified: sandbox/mirror/boost/mirror/detail/full_name_builder.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/detail/full_name_builder.hpp (original)
+++ sandbox/mirror/boost/mirror/detail/full_name_builder.hpp 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
@@ -40,6 +40,17 @@
         struct full_name_builder : public BaseMetaObject
         {
         private:
+
+ // don't prepend '::' to types on global scope
+ template <typename Type>
+ inline static void append_separator(
+ bstring& _str,
+ mpl::identity<meta_namespace<namespace_::_> >,
+ mpl::identity<detail::registered_type_info<Type> >
+ )
+ { }
+
+ // append separator to anything else
                 template <typename AnyScope, class AnyMO>
                 inline static void append_separator(
                         bstring& _str,
@@ -51,20 +62,11 @@
                         _str.append(separator);
                 }
 
- // don't prepend '::' to types on global scope
- template <typename Type>
- inline static void append_separator(
- bstring& _str,
- mpl::identity<meta_namespace<namespace_::_> >,
- mpl::identity<detail::registered_type_info<Type> >
- )
- { }
-
 
                 // initializes the full names
- inline static bstring init_name(void)
+ inline static bstring init_name(mpl::true_ _full)
                 {
- bstring res(Scope::get_name(mpl::true_()));
+ bstring res(Scope::get_name(_full));
                         append_separator(
                                 res,
                                 mpl::identity<Scope>(),
@@ -73,16 +75,32 @@
                         res.append(BaseMetaObject::get_name(mpl::false_()));
                         return res;
                 }
- public:
- // base name getter
- inline static const bstring& get_name(mpl::false_ _base)
+
+ // initializes the base names
+ inline static const bstring& init_name(mpl::false_ _base)
                 {
                         return BaseMetaObject::get_name(_base);
                 }
- // full name getter
- inline static const bstring& get_name(mpl::true_)
+ public:
+ // base of full name getter
+ template <bool FullName>
+ inline static const bstring& build_name(
+ mpl::bool_<FullName> full_or_base,
+ bstring& left,
+ bstring& right
+ )
+ {
+ return get_name(full_or_base);
+ }
+
+
+ // base of full name getter
+ template <bool FullName>
+ inline static const bstring& get_name(
+ mpl::bool_<FullName> full_or_base
+ )
                 {
- static bstring s_name(init_name());
+ static bstring s_name(init_name(full_or_base));
                         return s_name;
                 }
         };

Modified: sandbox/mirror/boost/mirror/meta_type.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_type.hpp (original)
+++ sandbox/mirror/boost/mirror/meta_type.hpp 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
@@ -57,7 +57,7 @@
 
 /** Macro for registering global-scope types
  */
-#define BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(BASE_NAME) \
+#define BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(BASE_NAME) \
         namespace detail { \
         template <> struct registered_type_info< BASE_NAME > \
         { \
@@ -67,6 +67,12 @@
         }; \
         } // namespace detail
 
+/** 'Shorthand' for BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE macro
+ */
+#define BOOST_MIRROR_REG_TYPE_GS(BASE_NAME) \
+ BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(BASE_NAME)
+
+
 /** Macro for registering types nested in namespaces
  */
 #define BOOST_MIRROR_REG_TYPE(NAMESPACE, BASE_NAME) \
@@ -86,6 +92,30 @@
                 BOOST_MIRRORED_NAMESPACE( NAMESPACE ) \
> \
 
+/** Macro for registering typedef-ined types in the global scope
+ */
+#define BOOST_MIRROR_REG_TYPEDEF_GLOBAL_SCOPE(TYPEDEFD_NAME) \
+ namespace typedef_ { \
+ template <class MetaNamespace> struct TYPEDEFD_NAME; \
+ template <> struct TYPEDEFD_NAME< \
+ BOOST_MIRRORED_GLOBAL_SCOPE() \
+ > { }; \
+ } /* namespace typedef_ */ \
+ namespace detail { \
+ template <> struct registered_type_info< \
+ BOOST_MIRROR_GET_TYPEDEFD_TYPE_SELECTOR( :: , TYPEDEFD_NAME) \
+ > \
+ { \
+ typedef BOOST_MIRRORED_GLOBAL_SCOPE() scope; \
+ typedef ::TYPEDEFD_NAME reflected_type; \
+ BOOST_MIRROR_REG_TYPE_DECLARE_BASE_NAME_HELPER(TYPEDEFD_NAME) \
+ }; \
+ } // namespace detail
+
+#define BOOST_MIRROR_REG_TYPEDEF_GS(TYPEDEFD_NAME) \
+ BOOST_MIRROR_REG_TYPEDEF_GLOBAL_SCOPE(TYPEDEFD_NAME)
+
+
 /** Macro for registering typedef-ined types in namespaces
  */
 #define BOOST_MIRROR_REG_TYPEDEF(NAMESPACE, TYPEDEFD_NAME) \
@@ -117,22 +147,26 @@
                 BOOST_MIRROR_REG_TYPE_DECLARE_BASE_NAME_HELPER(BASE_NAME) \
         };
 
+#define BOOST_MIRROR_REG_TYPE_EMB(WRAPPER, BASE_NAME) \
+ BOOST_MIRROR_REG_TYPE_EMBEDDED(WRAPPER, BASE_NAME)
+
+
 /** Register C++ native types
  */
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(void)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(bool)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(char)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(unsigned char)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(signed char)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(wchar_t)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(short int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(unsigned short int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(unsigned int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(long int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(unsigned long int)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(float)
-BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(double)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(void)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(bool)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(char)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(unsigned char)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(signed char)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(wchar_t)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(short int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(unsigned short int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(unsigned int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(long int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(unsigned long int)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(float)
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(double)
 
 /** Register std string and wstring
  */

Modified: sandbox/mirror/libs/mirror/doc/xml/mirror/_library.xml
==============================================================================
--- sandbox/mirror/libs/mirror/doc/xml/mirror/_library.xml (original)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/_library.xml 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
@@ -243,12 +243,17 @@
                         - Complete rewrite of type registering and reflection
 
                         - Changed the return value of base_name and full_name getters from const bchar* to bstring / const bstring&amp;
- - Replaced BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(TYPE) with BOOST_MIRROR_REG_GLOBAL_SCOPE_TYPE(TYPE) macro
 
                         - Added get_name(mpl::bool_&lt;FullName&gt;) function that gets the base name with mpl::false_ and full name with mpl::true_
                         - Removed the old non-trivial type name meta_types
- - Added new meta_type name decorator
-
+ - Added new meta_type name decorators
+
+ - Fixed multi-dimensional array type name building
+ - Added build_name(...) member function to the meta_type template
+ - Updated the registering/types.cpp example
+ - Added BOOST_MIRROR_REG_TYPE_GS as shorthand for BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE
+ - Added BOOST_MIRROR_REG_TYPEEF_GS and for BOOST_MIRROR_REG_TYPEDEF_GLOBAL_SCOPE for registering global scope typedefs
+ - Added BOOST_MIRROR_REG_TYPE_EMBEDDED and for BOOST_MIRROR_REG_TYPE_EMB for registering embedded types
 
                         - Tested with MSVC++ 2008 EE On Vista
                 </revision>

Modified: sandbox/mirror/libs/mirror/example/registering/types.cpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/registering/types.cpp (original)
+++ sandbox/mirror/libs/mirror/example/registering/types.cpp 2008-07-05 07:11:34 EDT (Sat, 05 Jul 2008)
@@ -15,9 +15,6 @@
 #include <boost/mirror/meta_type.hpp>
 //
 #include <boost/mirror/traits/reflects_global_scope.hpp>
-// utility that allows to put the name of the type to a given stream
-#include <boost/mirror/utils/name_to_stream/type.hpp>
-//
 //
 #include <boost/typeof/typeof.hpp>
 
@@ -35,6 +32,10 @@
 } // namespace feature
 } // namespace test
 
+struct bar { };
+struct baz { };
+typedef double foobar;
+
 
 namespace boost {
 namespace mirror {
@@ -54,6 +55,15 @@
 // register a typedef'd class this allows to distinguish it from
 // the 'source' type in some situations
 BOOST_MIRROR_REG_TYPEDEF(::test::feature::detail, foobar)
+//
+// register type on the global scope
+BOOST_MIRROR_REG_TYPE_GLOBAL_SCOPE(bar)
+// shorter version
+BOOST_MIRROR_REG_TYPE_GS(baz)
+//
+// typedef on the global scope
+// equivalent to BOOST_MIRROR_REG_TYPEDEF_GLOBAL_SCOPE(foobar)
+BOOST_MIRROR_REG_TYPEDEF_GS(foobar)
 
 } // namespace mirror
 } // namespace boost
@@ -77,39 +87,37 @@
         //
         // put the full name of the type to the output stream
         //
- bcout << "|00| " << name_to_stream< BOOST_MIRRORED_TYPE(int) >() << endl;
- bcout << "|01| " << name_to_stream< BOOST_MIRRORED_TYPE(foo) >() << endl;
- bcout << "|02| " << name_to_stream< BOOST_MIRRORED_TYPE(bar) >() << endl;
+ //
+ bcout << "|00| " << BOOST_MIRRORED_TYPE(int) ::full_name() << endl;
+ bcout << "|01| " << BOOST_MIRRORED_TYPE(foo) ::full_name() << endl;
+ bcout << "|02| " << BOOST_MIRRORED_TYPE(bar) ::full_name() << endl;
         //
         // Do the same thing with the typedef'd type
- // actually, nearly the same .. the true argument given to the
- // constructor makes the name_to_stream<> template, output the
- // leading "::" too.
- bcout << "|03| " << name_to_stream< meta_foo >(true) << endl;
- bcout << "|04| " << name_to_stream< meta_bar >(true) << endl;
+ bcout << "|03| " << meta_foo ::full_name() << endl;
+ bcout << "|04| " << meta_bar ::full_name() << endl;
 
         //
         // this works too...
- bcout << "|05| " << name_to_stream< BOOST_MIRRORED_TYPE(foo*) >() << endl;
- bcout << "|06| " << name_to_stream< BOOST_MIRRORED_TYPE(bar&) >() << endl;
- bcout << "|07| " << name_to_stream< BOOST_MIRRORED_TYPE(foo***) >() << endl;
- bcout << "|08| " << name_to_stream< BOOST_MIRRORED_TYPE(bar**&) >() << endl;
- bcout << "|09| " << name_to_stream< BOOST_MIRRORED_TYPE(const foo**) >() << endl;
- bcout << "|10| " << name_to_stream< BOOST_MIRRORED_TYPE(volatile bar*&) >() << endl;
+ bcout << "|05| " << BOOST_MIRRORED_TYPE(foo*)::full_name() << endl;
+ bcout << "|06| " << BOOST_MIRRORED_TYPE(bar&)::full_name() << endl;
+ bcout << "|07| " << BOOST_MIRRORED_TYPE(foo***)::full_name() << endl;
+ bcout << "|08| " << BOOST_MIRRORED_TYPE(bar**&) ::full_name() << endl;
+ bcout << "|09| " << BOOST_MIRRORED_TYPE(const foo**)::full_name() << endl;
+ bcout << "|10| " << BOOST_MIRRORED_TYPE(volatile bar*&)::full_name() << endl;
         //
- bcout << "|11| " << name_to_stream< BOOST_MIRRORED_TYPE(const volatile foo) >() << endl;
- bcout << "|12| " << name_to_stream< BOOST_MIRRORED_TYPE(const volatile bar*) >() << endl;
+ bcout << "|11| " << BOOST_MIRRORED_TYPE(const volatile foo)::full_name() << endl;
+ bcout << "|12| " << BOOST_MIRRORED_TYPE(const volatile bar*)::full_name() << endl;
         //
         // native c++ types are registered by default
- bcout << "|13| " << name_to_stream< BOOST_MIRRORED_TYPE(volatile short int) >() << endl;
- bcout << "|14| " << name_to_stream< BOOST_MIRRORED_TYPE(const char*) >() << endl;
- bcout << "|15| " << name_to_stream< BOOST_MIRRORED_TYPE(wchar_t*) >() << endl;
- bcout << "|16| " << name_to_stream< BOOST_MIRRORED_TYPE(bool) >() << endl;
+ bcout << "|13| " << BOOST_MIRRORED_TYPE(volatile short int)::full_name() << endl;
+ bcout << "|14| " << BOOST_MIRRORED_TYPE(const char*)::full_name() << endl;
+ bcout << "|15| " << BOOST_MIRRORED_TYPE(wchar_t*)::full_name() << endl;
+ bcout << "|16| " << BOOST_MIRRORED_TYPE(bool)::full_name() << endl;
         //
         // use with Boost.Typeof
- bcout << "|17| " << name_to_stream< BOOST_MIRRORED_TYPE(BOOST_TYPEOF(1+1)) >() << endl;
+ bcout << "|17| " << BOOST_MIRRORED_TYPE(BOOST_TYPEOF(1+1))::full_name() << endl;
         // ... and maybe more conveniently
- bcout << "|18| " << name_to_stream< BOOST_MIRRORED_TYPEOF(1.0/2.0) >() << endl;
+ bcout << "|18| " << BOOST_MIRRORED_TYPEOF(1.0/2.0)::full_name() << endl;
         //
 
         // sometimes it is useful to distinguish between a typedef'd type
@@ -124,9 +132,9 @@
         typedef BOOST_MIRRORED_TYPEDEF(::test::feature::detail, foobar) meta_foobar_td;
 
         //
- bcout << "|19| " << name_to_stream< meta_bchar >() << endl;
- bcout << "|20| " << name_to_stream< meta_bchar_td >() << endl;
- bcout << "|21| " << name_to_stream< meta_foobar_td >() << endl;
+ bcout << "|19| " << meta_bchar ::full_name() << endl;
+ bcout << "|20| " << meta_bchar_td ::full_name() << endl;
+ bcout << "|21| " << meta_foobar_td ::full_name() << endl;
         //
         // unfortunately BOOST_MIRRORED_TYPEDEF(...) works only if
         // the typedefined name is explicitly given
@@ -152,8 +160,6 @@
         bcout << "|28| " << BOOST_MIRRORED_TYPEDEF(::boost, bchar) ::full_name() << endl;
         bcout << "|29| " << BOOST_MIRRORED_TYPEDEF(::boost, bstring) ::full_name() << endl;
 
- bcout << "|30| " << BOOST_MIRRORED_TYPE(int const * ) ::full_name() << endl;
-
         bcout << "|30| " << BOOST_MIRRORED_TYPE(int const * const volatile) ::full_name() << endl;
         bcout << "|31| " << BOOST_MIRRORED_TYPE(int volatile * const * volatile * const *) ::full_name() << endl;
         bcout << "|32| " << BOOST_MIRRORED_TYPE(int const * const [321]) ::full_name() << endl;
@@ -167,9 +173,14 @@
         bcout << "|39| " << BOOST_MIRRORED_TYPE(const foo**) ::full_name() << endl;
         bcout << "|40| " << BOOST_MIRRORED_TYPE(volatile bar*&) ::full_name() << endl;
         //
- bcout << "|41| " << BOOST_MIRRORED_TYPE(const volatile foo) ::full_name() << endl;
+ bcout << "|41| " << BOOST_MIRRORED_TYPE(const volatile foo&) ::full_name() << endl;
         bcout << "|42| " << BOOST_MIRRORED_TYPE(const volatile bar*) ::full_name() << endl;
         //
+ bcout << "|43| " << BOOST_MIRRORED_TYPE(const volatile ::bar&) ::full_name() << endl;
+ bcout << "|44| " << BOOST_MIRRORED_TYPE(const volatile ::baz*) ::full_name() << endl;
+ bcout << "|44| " << BOOST_MIRRORED_TYPEDEF(::, foobar) ::full_name() << endl;
+ //
+ bcout << "|45| " << BOOST_MIRRORED_TYPE(::bar[][1][2][3][4][5][6][7][8][9]) ::full_name() << endl;
         //
         return 0;
 }


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