Boost logo

Boost Users :

Subject: [Boost-users] [serializaton] namespace issues with extended type info
From: Daniel Roberts (impulsionaudio_at_[hidden])
Date: 2009-01-13 18:29:18


If I nest macro calls such as:

namespace SomeNamespace
{
   BOOST_SERIALIZATION_ASSUME_ABSTRACT(SomeClass)
   BOOST_CLASS_TYPE_INFO(SomeClass, extended_type_info_no_rtti<SomeClass>)
   BOOST_CLASS_EXPORT(SomeClass)
}

inside the namespace containing the type I get a TON of compiler errors. The
wackiest is that the compiler thinks boost is a namespace inside of my
namespace. Things improve (not fully tested) if I move the macros outside of
my namespace and qualify the type with namespace name:

BOOST_SERIALIZATION_ASSUME_ABSTRACT(SomeNamespace::SomeClass)
BOOST_CLASS_TYPE_INFO(SomeNamespace::SomeClass,
extended_type_info_no_rtti<SomeNamespace::SomeClass>)
BOOST_CLASS_EXPORT(SomeNamespace::SomeClass)

Can someone explain please?

Thanks



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net