This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41759] New: [C++0x] <random> static_assert phrasing should be positive
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2009 21:58:40 -0000
- Subject: [Bug libstdc++/41759] New: [C++0x] <random> static_assert phrasing should be positive
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This patch:
http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00782.html
Introduces some compile time diagnostics:
- static_assert(__m == 0 || (__a < __m && __c < __m),
- "template arguments out of bounds"
- " in linear_congruential_engine");
+ static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+ "_UIntType not an unsigned integral type");
+ static_assert(__m == 0u || (__a < __m && __c < __m),
+ "template argument __m out of bounds");
Walter Brown has suggested for positive, not negative phrasing on diagnostics,
and indicated that some improvement may be possible. Details are a little
fuzzy, but this is a placeholder for that conversation.
If we do this for random, then there are other C++0x areas where we could also
do this, maybe the atomic bits?
--
Summary: [C++0x] <random> static_assert phrasing should be
positive
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41759