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

Subject: Re: [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: 2012-02-02 01:31:39


#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: Regression
Resolution: | Keywords: patch proposed, Boost.Spirit.Karma, Boost.Fusion, BOOST_FUSION_ADAPT_CLASS, BOOST_FUSION_ADAPT_ADT, short, int, long
-------------------------------+--------------------------------------------

Comment (by hkaiser):

 Replying to [comment:16 Seth Heeren <bugs@…>]:
> Replying to [comment:15 hkaiser]:
> >
> > That's excellent news! Thanks. That allows to revert the patch above.
>
> Do you have ideas on how to fix it? My suggestion for the OP is really
 a workaround:
>
> * bug: ADT accessors returning by value leads to UB
> * workaround: don't do that, then?
>
> The docs clearly suggest that returning by value from the accessors is
 `ok` practice (and that adds value, IMO). However, the code appears to
 have the assumption that attributes can always be fully 'resolved' to a
 reference.

 The docs are Fusion related. There it is possible and valid to do such
 things. The problem is that Karma (falsely) assumes this as well.

> Apart from specializing extract_from_attribute for adt_attribute_proxy I
 don't see an easy way to resolve this. And I wouldn't think that this
 approach is entirely trivial, either (it might be enough due to the
 implicit conversion of the proxy to its exposed type?)

 Yep, that's what I think needs to be done, at least as a first step.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6126#comment:17>
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:08 UTC