PR libstdc++/65883 missing unsigned in numeric_limits
Marc Glisse
marc.glisse@inria.fr
Tue Apr 28 12:47:00 GMT 2015
Hello,
this patch fixes an obvious typo. Regtested without problem, and I
manually checked that the new return value of max() makes more sense.
2015-04-28 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/65883
* include/std/limits (numeric_limits): Add missing unsigned.
--
Marc Glisse
-------------- next part --------------
Index: include/std/limits
===================================================================
--- include/std/limits (revision 222524)
+++ include/std/limits (working copy)
@@ -1483,21 +1483,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
\
template<> \
struct numeric_limits<unsigned TYPE> \
{ \
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
\
static _GLIBCXX_CONSTEXPR unsigned TYPE \
min() _GLIBCXX_USE_NOEXCEPT { return 0; } \
\
static _GLIBCXX_CONSTEXPR unsigned TYPE \
- max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \
+ max() _GLIBCXX_USE_NOEXCEPT \
+ { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \
\
UEXT \
\
static _GLIBCXX_USE_CONSTEXPR int digits \
= BITSIZE; \
static _GLIBCXX_USE_CONSTEXPR int digits10 \
= BITSIZE * 643L / 2136; \
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
More information about the Libstdc++
mailing list