Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-11-30 12:54:05


> Summary: missing ## in some concatenations
>
> Initial Comment:
> in file "...boost\mpl\list.hpp":
>
> # define MPL_AUX_LIST_HEADER
> BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp /**/
>
> Results in a space being inserted in the filename, before
> the period. Adding a "##" to the line above fixes the
> problem, i.e.:
>
> .....,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp /**/
>
> I'm using latest betas for boost, STLport and Digital Mars.
>
> Regards.
> dan

The compilers are wrong to insert a space, and a concatenation here is undefined
behavior. A better way to fix it would be to try this:

#define MPL_AUX_LIST_HEADER \
    MPL_AUX_LIST_HEADER_I(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)) \
    /**/
#define MPL_AUX_LIST_HEADER_I(name) name.hpp

Regards,
Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk