
Alexander Nasonov wrote:
Alexander Nasonov <alnsn@yandex.ru> wrote
My attempt to compile ./libs/typeof/test/main.cpp failed...
Could you tell me what exactly the Intel compiler complained about? If you surround typename by comments at line 115 in register_functions.hpp
Arkadiy Vertleyb wrote: the compilation will stop only after #pragma message("compiling Modifiers example..."). ... and only in there saying: ../../../boost/typeof/typeof.hpp(37): error: more than one partial specialization matches the template argument list of class "boost::type_of::encode_type_impl<boost::type_of::encode_type_impl<boost::type_of::detail::push_back<boost::type_of::detail::push_back<boost::mpl::vector0<boost::mpl::void_>, boost::mpl::int_<131093>>::type, boost::mpl::int_<458770>>::type, const int *const>::type, const int [20]>" "boost::type_of::encode_type_impl<V, const T>" "boost::type_of::encode_type_impl<V, T [N]>"
I'd suggest to use is_array in combination with mpl::if_: template<class V, class T> struct encode_type_impl; template<class V, class T> struct encode_type_impl_array; // HERE! template<class T, class Iter> struct decode_type_impl; template<class V, class T> struct encode_type : boost::mpl::if_< ::boost::is_array<T>, encode_type_impl_array<V, T>, // AND HERE! encode_type_impl<V, T> >::type {}; Of course, you have to append _array to appropriate specialization of encode_type_impl. -- Alexander Nasonov