
Alexander Nasonov wrote:
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.
This would definitely solve the problem but, as I said, I have concernes about the need to instantiate mpl::if_<> and is_array<> for every node in the expression. I think we can get away by just providing a more specialized case: boost::type_of::encode_type_impl<V, const T [N]>. http://groups.yahoo.com/group/boost/files/typeof.zip On VC7.1 it seems to work fine (as it was before, actually), but unfortunately I can't test this on Intel... Arkadiy