
----- Mensaje original ----- De: Aleksey Gurtovoy <agurtovoy@meta-comm.com> Fecha: Sábado, Julio 28, 2007 11:14 pm Asunto: Re: [Boost-users] [mpl] what is not a placeholder expression Para: boost-users@lists.boost.org
""JOAQUIN LOPEZ MU?Z"" <joaquin@tid.es> wrote in message
[...]
1. Whether I'm right in assuming that the code above should compile without assertion failures.
Yes.
2. What the behavior is for other versions of GCC and compilers: reports most welcome!!
Basically, this is a GCC-specific problem caused by a non-conforming extension that was removed in 4.2.0 (http://gcc.gnu.org/gcc-4.2/changes.html, search for "(undocumented) extension").
3. Whether this is a known problem specific to GCC or, more generally, what the status of this issue is.
It is, and it's not a issue anymore starting with GCC 4.2. You should be able to work around it for older versions by providing a specialization of the 'boost::mpl::aux::template_arity' template along the following lines (untested):
template<typename T,int n> struct template_arity<foo<T,n> > : int_<-1> {};
Thank you thank you thank you for the very precise and authoritative information! Best regards, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo