template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- rbegin(_Container& __cont) -> decltype(__cont.rbegin())
+ rbegin(_Container& __cont) noexcept(noexcept(__cont.rbegin()))
+ -> decltype(__cont.rbegin())
{ return __cont.rbegin(); }
/**
template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- rbegin(const _Container& __cont) -> decltype(__cont.rbegin())
+ rbegin(const _Container& __cont) noexcept(noexcept(__cont.rbegin()))
+ -> decltype(__cont.rbegin())
{ return __cont.rbegin(); }
/**
template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- rend(_Container& __cont) -> decltype(__cont.rend())
+ rend(_Container& __cont) noexcept(noexcept(__cont.rend()))
+ -> decltype(__cont.rend())
{ return __cont.rend(); }
/**
template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- rend(const _Container& __cont) -> decltype(__cont.rend())
+ rend(const _Container& __cont) noexcept(noexcept(__cont.rend()))
+ -> decltype(__cont.rend())
{ return __cont.rend(); }
/**
template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont))
+ crbegin(const _Container& __cont) noexcept(noexcept(std::rbegin(__cont)))
+ -> decltype(std::rbegin(__cont))
{ return std::rbegin(__cont); }
/**
template<typename _Container>
[[__nodiscard__, __gnu__::__always_inline__]]
inline _GLIBCXX17_CONSTEXPR auto
- crend(const _Container& __cont) -> decltype(std::rend(__cont))
+ crend(const _Container& __cont) noexcept(noexcept(std::rend(__cont)))
+ -> decltype(std::rend(__cont))
{ return std::rend(__cont); }
#endif // C++14
#ifdef _GLIBCXX_RELEASE
// Conditional noexcept on these functions is a libstdc++ extension
-# define NOTHROW(F) noexcept(noexcept(c.F()))
+# define NOTHROW(F) noexcept(noexcept(F))
#else
# define NOTHROW(F)
#endif
{
template<class C>
CONSTEXPR_17 auto
- begin(C& c) NOTHROW(begin) -> decltype(c.begin());
+ begin(C& c) NOTHROW(c.begin()) -> decltype(c.begin());
template<class C>
CONSTEXPR_17 auto
- begin(const C& c) NOTHROW(begin) -> decltype(c.begin());
+ begin(const C& c) NOTHROW(c.begin()) -> decltype(c.begin());
template<class C>
CONSTEXPR_17 auto
- end(C& c) NOTHROW(end) -> decltype(c.end());
+ end(C& c) NOTHROW(c.end()) -> decltype(c.end());
template<class C>
CONSTEXPR_17 auto
- end(const C& c) NOTHROW(end) -> decltype(c.end());
+ end(const C& c) NOTHROW(c.end()) -> decltype(c.end());
template<class T, size_t N>
CONSTEXPR_14 T*
template<class C>
CONSTEXPR_17 auto
- rbegin(C& c) -> decltype(c.rbegin());
+ rbegin(C& c) NOTHROW(c.rbegin()) -> decltype(c.rbegin());
template<class C>
CONSTEXPR_17 auto
- rbegin(const C& c) -> decltype(c.rbegin());
+ rbegin(const C& c) NOTHROW(c.rbegin()) -> decltype(c.rbegin());
template<class C>
CONSTEXPR_17 auto
- rend(C& c) -> decltype(c.rend());
+ rend(C& c) NOTHROW(c.rend()) -> decltype(c.rend());
template<class C>
CONSTEXPR_17 auto
- rend(const C& c) -> decltype(c.rend());
+ rend(const C& c) NOTHROW(c.rend()) -> decltype(c.rend());
template<class T, size_t N>
CONSTEXPR_17 reverse_iterator<T*>
template<class C>
CONSTEXPR_17 auto
- crbegin(const C& c) -> decltype(std::rbegin(c));
+ crbegin(const C& c) NOTHROW(std::rbegin(c)) -> decltype(std::rbegin(c));
template<class C>
CONSTEXPR_17 auto
- cend(const C& c) -> decltype(std::rend(c));
+ cend(const C& c) NOTHROW(std::rend(c)) -> decltype(std::rend(c));
#endif // C++14
}