Add noexcept to std::integral_constant members
Backport from mainline 2017-12-01 Jonathan Wakely <jwakely@redhat.com> * include/std/type_traits (integral_constant): Make member functions noexcept (LWG 2346). * include/std/utility (integer_sequence): Likewise. From-SVN: r255328
This commit is contained in:
parent
32d94e772e
commit
526e9a2a50
@ -1,5 +1,12 @@
|
||||
2017-12-01 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backport from mainline
|
||||
2017-12-01 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/std/type_traits (integral_constant): Make member functions
|
||||
noexcept (LWG 2346).
|
||||
* include/std/utility (integer_sequence): Likewise.
|
||||
|
||||
Backport from mainline
|
||||
2017-11-16 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
|
@ -71,12 +71,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
static constexpr _Tp value = __v;
|
||||
typedef _Tp value_type;
|
||||
typedef integral_constant<_Tp, __v> type;
|
||||
constexpr operator value_type() const { return value; }
|
||||
constexpr operator value_type() const noexcept { return value; }
|
||||
#if __cplusplus > 201103L
|
||||
|
||||
#define __cpp_lib_integral_constant_callable 201304
|
||||
|
||||
constexpr value_type operator()() const { return value; }
|
||||
constexpr value_type operator()() const noexcept { return value; }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -323,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
struct integer_sequence
|
||||
{
|
||||
typedef _Tp value_type;
|
||||
static constexpr size_t size() { return sizeof...(_Idx); }
|
||||
static constexpr size_t size() noexcept { return sizeof...(_Idx); }
|
||||
};
|
||||
|
||||
template<typename _Tp, _Tp _Num,
|
||||
|
Loading…
Reference in New Issue
Block a user