[Boost-bugs] [Boost C++ Libraries] #6126: Signed integer members of Boost.Fusion adapted ADTs are not output correctly with Boost.Spirit.Karma rules

Subject: [Boost-bugs] [Boost C++ Libraries] #6126: Signed integer members of Boost.Fusion adapted ADTs are not output correctly with Boost.Spirit.Karma rules
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-16 15:35:38


#6126: Signed integer members of Boost.Fusion adapted ADTs are not output
correctly with Boost.Spirit.Karma rules
------------------------------------------------------------------------------------------------------------------+
 Reporter: t0rt1e@… | Owner: hkaiser
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: Boost.Spirit.Karma, Boost.Fusion, BOOST_FUSION_ADAPT_CLASS, BOOST_FUSION_ADAPT_ADT, short, int, long |
------------------------------------------------------------------------------------------------------------------+
 Boost.Spirit.Karma output rules should show the same behavior for Boost
 .Fusion-adapted structs (direct access of the public member variables) and
 ADTs (access to the private member variables via getters and setters).
 This has been the case in Boost 1.44 and is demonstrated in this test case
 for rational number ADTs and structs, which use signed integer member
 variables. The test case takes into account the name change of macro
 {{{BOOST_FUSION_ADAPT_CLASS}}} to {{{BOOST_FUSION_ADAPT_ADT}}} as well as
 the additionally required header
 {{{boost/spirit/include/support_adapt_adt_attributes.hpp}}} (cf. to ticket
 #5780).

 Compilation of this test case against Boost 1.45.0 and 1.46.1 will fail.
 Compilation against Boost 1.47.0 and 1.48.0 will succeed, but the output
 of negative values of signed integer members of Boost.Fusion-adapted ADTs
 will be wrong. The minus sign is output correctly, but it is followed by a
 wrong value, which seems to be yielded by a cast from a signed to an
 unsigned integer value instead of taking the absolute value of the signed
 integer value. This has been observed on Mac OS X 10.7.2 (x86_64) with
 Xcode 4.2 using Apple's g++ 4.2.1, Apple's clang++ 3.0. Interestingly,
 compiling the test case against Boost 1.47.0 or Boost 1.48.0 using
 !MacPorts g++ 4.5.3, will yield more output checks to fail for Boost
 .Fusion-adapted ADTs used in Karma output rules.

 Compilation against Boost from the Subversion trunk (rev. 75505) does only
 succeed using Apple's clang++ 3.0 and execution will yield the same wrong
 output for negative values of signed integer members of Boost.Fusion-
 adapted ADTs. Compilation fails with Apple's g++ 4.2.1 and !MacPorts g++
 4.5.3.

 Attached to this ticket are the source of the test case, the output of the
 failing test case compiled against Boost 1.47/1.48 using gcc 4.2.1 and
 clang++ 3.0 as well as the different output using !MacPorts g++ 4.5.3. The
 g++ 4.2.1 and g++ 4.5.3 compiler outputs for compilation against Boost
 trunk rev. 75505 are attached as well.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6126>
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:50:07 UTC