Skip to content

Commit

Permalink
Mark get_c_array as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 26, 2025
1 parent fe60e16 commit 17b49d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/boost/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,17 @@ namespace boost {
x.swap(y);
}

// Specific for boost::array: simply returns its elems data member.
// undocumented and obsolete
template <typename T, std::size_t N>
BOOST_DEPRECATED( "please use `elems` instead" )
T(&get_c_array(boost::array<T,N>& arg))[N]
{
return arg.elems;
}

// Const version.
template <typename T, std::size_t N>
BOOST_DEPRECATED( "please use `elems` instead" )
const T(&get_c_array(const boost::array<T,N>& arg))[N]
{
return arg.elems;
Expand Down

0 comments on commit 17b49d8

Please sign in to comment.