Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-01-24 18:02:30


Hugo Duncan wrote:
> I think I have found a problem with boost/mpl/list.hpp
>
> I am including files using BOOST_PP_ITERATE. One of the files
> that I include happens itself to include boost/mpl/list.hpp.
>
>
> boost/mpl/list.hpp begins
>
> #if !defined(BOOST_PP_IS_ITERATING)
> ///// header body
> #ifndef BOOST_MPL_LIST_HPP_INCLUDED
> #define BOOST_MPL_LIST_HPP_INCLUDED
>
>
> Because I am using BOOST_PP_ITERATE, BOOST_PP_IS_ITERATING is defined,
> and problems occur.

In general, you shouldn't include any headers _inside file iteration
section_ of your header - there is just no point of doing this (and, for
"normal" headers, no effect, expect for possible performance degradation),
unless you are doing something pretty special.

If you move the "boost/mpl/list.hpp" include from the section being iterated
to a "static" part of the header, everything should work fine. If it doesn't
please post an example of the code that causes troubles for you.

Aleksey


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