+2017-11-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/range_access.h (size, empty, data): Add conditional
+ noexcept to generic overloads.
+
2017-11-14 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement LWG 2733 and LWG 2759
#endif // C++14
-#if __cplusplus > 201402L
+#if __cplusplus >= 201703L
#define __cpp_lib_nonmember_container_access 201411
/**
*/
template <typename _Container>
constexpr auto
- size(const _Container& __cont) -> decltype(__cont.size())
+ size(const _Container& __cont) noexcept(noexcept(__cont.size()))
+ -> decltype(__cont.size())
{ return __cont.size(); }
/**
*/
template <typename _Container>
constexpr auto
- empty(const _Container& __cont) -> decltype(__cont.empty())
+ empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
+ -> decltype(__cont.empty())
{ return __cont.empty(); }
/**
*/
template <typename _Container>
constexpr auto
- data(_Container& __cont) -> decltype(__cont.data())
+ data(_Container& __cont) noexcept(noexcept(__cont.data()))
+ -> decltype(__cont.data())
{ return __cont.data(); }
/**
*/
template <typename _Container>
constexpr auto
- data(const _Container& __cont) -> decltype(__cont.data())
+ data(const _Container& __cont) noexcept(noexcept(__cont.data()))
+ -> decltype(__cont.data())
{ return __cont.data(); }
/**