Opened 12 years ago

Closed 12 years ago

#4304 closed Bugs (fixed)

[karma] uint_ doesn't compile with STLPort

Reported by: Andrey Semashev Owned by: Hartmut Kaiser
Milestone: Boost 1.44.0 Component: spirit
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

I get the following error:

./boost/spirit/home/karma/numeric/uint.hpp:239: error: ‘! stlp_std::priv::_Integer_limits<unsigned int, 0u, 4294967295u, -0x00000000000000001, true>::is_signed’ is not a valid template argument for type ‘bool’ because it is a non-constant expression
./boost/spirit/home/karma/numeric/uint.hpp:239: error: no matching function for call to ‘assertion_failed(mpl_::failed************ (boost::spirit::karma::any_uint_generator<unsigned int, boost::fusion::unused_type, boost::fusion::unused_type, 10u>::signed_unsigned_mismatch::************)())’

The problem appears because operator! is used in context of a constant expression. While technically this is correct, it seems to confuse GCC. The attached patch solves the problem.

PS: GCC 4.4.1, STLPort 5.2.1.

Attachments (1)

uint.diff (1.3 KB ) - added by Andrey Semashev 12 years ago.
The patch solves the compilation problem.

Download all attachments as: .zip

Change History (3)

by Andrey Semashev, 12 years ago

Attachment: uint.diff added

The patch solves the compilation problem.

comment:1 by anonymous, 12 years ago

Owner: changed from Joel de Guzman to Hartmut Kaiser

comment:2 by Hartmut Kaiser, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in rev. [62506]

Note: See TracTickets for help on using tickets.