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:03:20


#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 bugs@…):

 Thinking aloud:

 I suppose the extract_from helper should just return the attribute proxy
 by value.

 I can see how that is undesirable for the general case (non-copyable or
 copy-expensive attributes), but keep in mind that for adapted ADT's, the
 `adt_attribute_proxy` instance can easily be returned by value while still
 allowing the compiler to generate optimum code:

   - RVO elides the copying,
   - the caller can bind the temporary to a const& in case it needs to
 access it twice (insert_int) and
   - inlining does the rest

 ----

 Of the wall: might this (the 'premature' decaying of the proxy to it's
 exposed attribute type) have something to do with the special casing of
 single-element-sequences in attribute extraction (decaying of a sequence
 to it's single element)?

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