As previously described in my former posting
(http://lists.boost.org/boost-users/2006/10/22961.php) I am trying to instantiate a mpl::map with
150 types.
Defining macros as stated in the documentation did not help. After taking a look in to the
boost/mpl/map.hpp include file I assume that previously described error resides because compiler
tries to include some pre-generated files:
----------------map.hpp excerpt-----------------
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include
# include
# include
# include
# include
# include
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
# define AUX778076_MAP_HEADER \
BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE).hpp \
/**/
#else
# define AUX778076_MAP_HEADER \
BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE)##.hpp \
/**/
#endif
# include BOOST_PP_STRINGIZE(boost/mpl/map/AUX778076_MAP_HEADER)
# undef AUX778076_MAP_HEADER
#endif
#include
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER map.hpp
# include
#else
# include
# define AUX778076_SEQUENCE_NAME map
# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_MAP_SIZE
# include
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_MAP_HPP_INCLUDED
-------------end of map.hpp excerpt-------------
As described in the documentation this file can not generate anything in a preprocessor mode until
the macro BOOST_MPL_PREPROCESSING_MODE was defined. After the definition of this macro I got new
errors. This errors were referring to some unknown types but the fact of preprossor execution was
obvious at this time.
The new errors are:
c:\boost\include\boost-1_33_1\boost\mpl\aux_\sequence_wrapper.hpp(246) : error C2065: 'na' :
undeclared identifier
c:\boost\include\boost-1_33_1\boost\mpl\aux_\sequence_wrapper.hpp(254) : error C2913: explicit
specialization; 'boost::mpl::map' is not a specialization of a class template
c:\boost\include\boost-1_33_1\boost\mpl\aux_\sequence_wrapper.hpp(254) : error C2976:
'boost::mpl::map' : too few template arguments
c:\boost\include\boost-1_33_1\boost\mpl\aux_\sequence_wrapper.hpp(254) : see declaration
of 'boost::mpl::map'
To be honest I do not know what would be the right solution, but the documentation insisted way
does not work.
Attached is my cpp file containing the defintions. I try to compile it using Visual C++ 2005
Express Edition. Should I run some generator scripts to create map60.hpp ... map150.hpp? Or is
there any other solution?
Would really appreciate any help!
With Kind Regards,
Ovanes Markarian