Skip to content

Commit 435b293

Browse files
committed
Mark std::get illegal overloads as deprecated
1 parent 6447b40 commit 435b293

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/boost/array.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,14 @@ namespace boost {
416416
// If we don't have std::array, I'm assuming that we don't have std::get
417417
namespace std {
418418
template <size_t Idx, typename T, size_t N>
419+
BOOST_DEPRECATED( "please use `boost::get` instead" )
419420
T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
420421
BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" );
421422
return arr[Idx];
422423
}
423424

424425
template <size_t Idx, typename T, size_t N>
426+
BOOST_DEPRECATED( "please use `boost::get` instead" )
425427
const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
426428
BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" );
427429
return arr[Idx];

0 commit comments

Comments
 (0)