summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/debug/array
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/debug/array')
-rw-r--r--libstdc++-v3/include/debug/array8
1 files changed, 8 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/array b/libstdc++-v3/include/debug/array
index 9c279221040..95edc84f38b 100644
--- a/libstdc++-v3/include/debug/array
+++ b/libstdc++-v3/include/debug/array
@@ -306,6 +306,14 @@ namespace __debug
return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::
_S_ref(__arr._M_elems, _Int);
}
+
+ template<std::size_t _Int, typename _Tp, std::size_t _Nm>
+ constexpr const _Tp&&
+ get(const array<_Tp, _Nm>&& __arr) noexcept
+ {
+ static_assert(_Int < _Nm, "index is out of bounds");
+ return std::move(__debug::get<_Int>(__arr));
+ }
} // namespace __debug
_GLIBCXX_BEGIN_NAMESPACE_VERSION