Hi all,

Please take a look as this trivial example of file iteration:

// trivial.h
#if !BOOST_PP_IS_ITERATING
#ifndef TRIVIAL_H
#define TRIVIAL_H
#include <boost/preprocessor/iteration/iterate.hpp>

#define BOOST_PP_FILENAME_1 "trivial.h" //!!!
#define BOOST_PP_ITERATION_LIMITS (1, 3)
??=include BOOST_PP_ITERATE()

#endif // TRIVIAL_H

#else

BOOST_PP_ITERATION()

#endif

Perhaps not so obvious many (wasn't to me),  that

#define BOOST_PP_FILENAME_1 __FILE__

doesn't work. One has to specify (kind of like hardcode) the file's name in there.. Is there some, possibly contrived, way to achieve automation of this?

regards,
- Levent

PS: What an AMAZING library this Boost.Preprocessor is!?

--
Server Levent Yilmaz
Mechanical Engineering
University of Pittsburgh