diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2017-12-01 15:09:57 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2017-12-01 15:09:57 +0000 |
commit | 352111c5b1519c9c56531e1fcd32380dcdd62305 (patch) | |
tree | 218f50efd767d7446b762181286721ab38d6f4ef /libstdc++-v3 | |
parent | 276515e6adb1c74234908d627d4fee3840046d74 (diff) | |
download | gcc-352111c5b1519c9c56531e1fcd32380dcdd62305.zip gcc-352111c5b1519c9c56531e1fcd32380dcdd62305.tar.gz gcc-352111c5b1519c9c56531e1fcd32380dcdd62305.tar.bz2 |
Add noexcept to std::integral_constant members
* include/std/type_traits (integral_constant): Make member functions
noexcept (LWG 2346).
* include/std/utility (integer_sequence): Likewise.
From-SVN: r255312
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/std/type_traits | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/std/utility | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e254578..a23830d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +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. + 2017-11-30 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/65927 diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 723c137..1d639e4 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -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 }; diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index e738632..da17928 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -321,7 +321,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); } }; /// Alias template make_integer_sequence |