Skip to content

Commit

Permalink
Remove obsolete Sun workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 26, 2025
1 parent 16280f6 commit fe60e16
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions include/boost/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,33 +374,6 @@ namespace boost {
x.swap(y);
}

#if defined(__SUNPRO_CC)
// Trac ticket #4757; the Sun Solaris compiler can't handle
// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
//
// We can't just use this for all compilers, because the
// borland compilers can't handle this form.
namespace detail {
template <typename T, std::size_t N> struct c_array
{
typedef T type[N];
};
}

// 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;
}

// Specific for boost::array: simply returns its elems data member.
template <typename T, std::size_t N>
typename detail::c_array<T,N>::type const& get_c_array(const boost::array<T,N>& arg)
{
return arg.elems;
}
#else
// 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]
Expand All @@ -414,7 +387,6 @@ namespace boost {
{
return arg.elems;
}
#endif

#if 0
// Overload for std::array, assuming that std::array will have
Expand Down

0 comments on commit fe60e16

Please sign in to comment.