
At Wed, 20 Oct 2010 12:08:28 -0700, Marshall Clow wrote:
Yeah - it's complaining about a method in boost::array:
// Specific for boost::array: simply returns its elems data member. template <typename T, std::size_t N> T(&get_c_array(boost::array<T,N>& arg))[N] { return arg.elems; }
I don't see any subscript operators there at all. ;-) I suspect that this is a limitation of the compiler.
My guess is it can't parse the function-returning-reference-to-array syntax. You can try this instead: namespace detail { template <typename T, std::size_t N> struct c_array { typedef T[N] type; }; } // Specific for boost::array: simply returns its elems data member. template <typename T, std::size_t N> typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg) { return arg.elems; } HTH, -- Dave Abrahams BoostPro Computing http://www.boostpro.com