aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-04-27 12:57:58 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-04-27 12:57:58 +0100
commit45e206963a226dc93046a671951f8cc5bcce52cf (patch)
tree3fa28d5a712558b67980daee0e84ac6b38faad30
parent5819764843d6847f9aa7885362c3cee4f246eeea (diff)
downloadgcc-45e206963a226dc93046a671951f8cc5bcce52cf.zip
gcc-45e206963a226dc93046a671951f8cc5bcce52cf.tar.gz
gcc-45e206963a226dc93046a671951f8cc5bcce52cf.tar.bz2
libstdc++/70767 Define std::numeric_limits<cv T> in C++98 mode
PR libstdc++/70767 * include/std/limits: Update comments about DRs. (numeric_limits<const _Tp>, numeric_limits<volatile _Tp>, numeric_limits<const volatile _Tp>): Define unconditionally. From-SVN: r235486
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/limits13
2 files changed, 14 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index e50b9ad..080fd59 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2016-04-27 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/70767
+ * include/std/limits: Update comments about DRs.
+ (numeric_limits<const _Tp>, numeric_limits<volatile _Tp>,
+ numeric_limits<const volatile _Tp>): Define unconditionally.
+
2016-04-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70762
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
index b25f825..53a183f 100644
--- a/libstdc++-v3/include/std/limits
+++ b/libstdc++-v3/include/std/limits
@@ -307,9 +307,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* representation of a fundamental type on a given platform. For
* non-fundamental types, the functions will return 0 and the data
* members will all be @c false.
- *
- * _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
- * noted, but not incorporated in this documented (yet).
*/
template<typename _Tp>
struct numeric_limits : public __numeric_limits_base
@@ -360,7 +357,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
};
-#if __cplusplus >= 201103L
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 559. numeric_limits<const T>
+
template<typename _Tp>
struct numeric_limits<const _Tp>
: public numeric_limits<_Tp> { };
@@ -372,10 +371,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
struct numeric_limits<const volatile _Tp>
: public numeric_limits<_Tp> { };
-#endif
// Now there follow 16 explicit specializations. Yes, 16. Make sure
- // you get the count right. (18 in c++0x mode)
+ // you get the count right. (18 in C++11 mode, with char16_t and char32_t.)
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 184. numeric_limits<bool> wording problems
/// numeric_limits<bool> specialization.
template<>