[Bug c++/44021] Templates with -Wtype-limits produces warnings.

2010-05-07 Thread jwakely dot gcc at gmail dot com
--- Comment #1 from jwakely dot gcc at gmail dot com 2010-05-07 08:49 --- this seems like a good candidate for using template specialisation to alter the behaviour I think the warning is still useful for templates, since it warns you of a potential mistake in your logic. It doesn't

[Bug c++/44021] Templates with -Wtype-limits produces warnings.

2010-05-07 Thread crossroads0000 at googlemail dot com
--- Comment #2 from crossroads at googlemail dot com 2010-05-07 11:22 --- Having to specialize for every unsigned or signed integer types makes no sense, depends on the standard being used (e.g. if there is a long long type or not), and whether or not the given implementation has

[Bug c++/44021] Templates with -Wtype-limits produces warnings.

2010-05-07 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2010-05-07 12:09 --- I didn't suggest specialising on every type, you could specialise on numeric_limitsinteger::is_signed -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44021

[Bug c++/44021] Templates with -Wtype-limits produces warnings.

2010-05-07 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2010-05-07 12:20 --- alternatively you could just use std::lessinteger()(x, 0) which avoids the warning -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44021

[Bug c++/44021] Templates with -Wtype-limits produces warnings.

2010-05-07 Thread bangerth at gmail dot com
--- Comment #5 from bangerth at gmail dot com 2010-05-07 13:15 --- *** This bug has been marked as a duplicate of 11856 *** -- bangerth at gmail dot com changed: What|Removed |Added