diff --git a/include/boost/array.hpp b/include/boost/array.hpp index 7df2771..e80080c 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -346,7 +346,8 @@ namespace boost { x.swap(y); } - // Specific for boost::array: simply returns its elems data member. +#if 0 + // Specific for boost::array: simply returns its elems data member. template T(&get_c_array(boost::array& arg))[N] { @@ -359,7 +360,29 @@ namespace boost { { return arg.elems; } +#else + namespace detail { + template struct c_array + { + typedef T type[N]; + }; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename detail::c_array::type& get_c_array(boost::array& arg) + { + return arg.elems; + } + // Specific for boost::array: simply returns its elems data member. + template + const typename detail::c_array::type& get_c_array(const boost::array& arg) + { + return arg.elems; + } +#endif + #if 0 // Overload for std::array, assuming that std::array will have // explicit conversion functions as discussed at the WG21 meeting