Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-25 09:24:29


"Martin Ecker" <martin.ecker_at_[hidden]> writes:

> Hello,
>
> I wanted to use boost::variant, so I got the Boost libraries
> from CVS. While developing a small test program I discovered
> an issue in the MPL header file apply.hpp that prevented
> successful compilation on MSVC 7.1. In particular, starting
> on line 245 in boost/mpl/apply.hpp it says
>
> // ISO98 C++, with minor concession to vc7
>
> template<
> typename F, AUX_APPLY_N_PARAMS(i, typename T)
> >
> struct BOOST_PP_CAT(apply,i)
> {
> // Metafunction forwarding confuses vc7
> typedef typename F::template apply<
> AUX_APPLY_N_PARAMS(i, T)
> >::type
>
> BOOST_MPL_AUX_LAMBDA_SUPPORT(
> BOOST_PP_INC(i)
> , BOOST_PP_CAT(apply,i)
> , (F, AUX_APPLY_N_PARAMS(i,T))
> )
> };
>
> The first typedef in that struct should be
>
> // Metafunction forwarding confuses vc7
> typedef typename F::template apply<
> AUX_APPLY_N_PARAMS(i, T)
> >::type type;

Thanks. This bug has gone unnoticed since October! But it's a little
bit strange that you encountered it at all, since your compiler should
be seeing the preprocessed header at
boost/mpl/aux_/preprocessed/plain/apply.hpp (unless you've got
BOOST_MPL_NO_PREPROCESSED_HEADERS defined, of course).

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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