Subject: [Boost-bugs] [Boost C++ Libraries] #2629: The Integer concept fails for char
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-01-01 03:57:46
#2629: The Integer concept fails for char
------------------------------------------------+---------------------------
Reporter: Joel Lathrop <jal6806_at_[hidden]> | Owner: jsiek
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: concept_check
Version: Boost 1.37.0 | Severity: Problem
Keywords: concept_check Integer concept char |
------------------------------------------------+---------------------------
The Integer concept fails for char (e.g.
BOOST_CONCEPT_ASSERT((Integer<char>)) results in a compiler error).
However, Section 3.9.1 paragraph 7 of the C++ standard states, "Types
bool, char, wchar_t, and the signed and unsigned integer types are
collectively called ''integral'' types. A synonym for integral type is
''integer type''." So while char is not a signed integer type nor is it
an unsigned integer type (and therefore is rightly rejected by the
SignedInteger and UnsignedInteger concepts), it ''is'' an integer type and
should be accepted by the Integer concept.
This bug can be easily fixed by adding an instantiation for char to the
Integer template in concept_check.hpp.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2629> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC