aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-12-01 15:09:57 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-12-01 15:09:57 +0000
commit352111c5b1519c9c56531e1fcd32380dcdd62305 (patch)
tree218f50efd767d7446b762181286721ab38d6f4ef /libstdc++-v3
parent276515e6adb1c74234908d627d4fee3840046d74 (diff)
downloadgcc-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/ChangeLog6
-rw-r--r--libstdc++-v3/include/std/type_traits4
-rw-r--r--libstdc++-v3/include/std/utility2
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