Boost logo

Boost Users :

From: Bill Lear (rael_at_[hidden])
Date: 2007-09-20 09:49:38


On Wednesday, September 19, 2007 at 21:42:21 (-0700) Robert Ramey writes:
>I would expect making BOOST_SERIALIZATION_NVP a fancier would address this.
>
>I think - though off hand I don't remember, that this macro as well as
>others
>are decorated with #ifdefs for different compilers. I doubt on more will
>make a difference.

Ok, here is the macro, from boost/serialization/nvp.hpp:

#define BOOST_SERIALIZATION_NVP(name) \
    boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name)

and here is the code from the same file for make_nvp:

template<class T>
inline
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
const
#endif
nvp<T> make_nvp(const char * name, T & t){
    return nvp<T>(name, t);
}

So, I assume adding something of the sort:

#ifdef BOOST_PATHSCALE_EKO
...
#endif

to either make_nvp or BOOST_SERIALIZATION_NVP (and defining
BOOST_PATHSCALE_EKO appropriately, of course) is what you mean by a
"fancier" macro. However, I'm not sure how to begin fixing this ---
do you have something in mind?

What I find baffling is that this works fine under gcc (4.1.2) and the
Intel compiler, though they both prevent you from compiling the test
case I sent.

Bill


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