Re: [Boost-bugs] [Boost C++ Libraries] #8775: fusion transform and fold not respecting const-ness of the sequence

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8775: fusion transform and fold not respecting const-ness of the sequence
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-07 21:44:30


#8775: fusion transform and fold not respecting const-ness of the sequence
--------------------------------------+---------------------
  Reporter: eric_niebler | Owner: djowel
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: fusion
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+---------------------

Comment (by eric_niebler):

 Right, the sequences are both non-const lvalues, so the elements passed to
 `F` and `G` should also be non-const lvalues. But they're not. They're
 const lvalues, which means they can't bind to the non-const references.

 You should double-check that gcc compiles it successfully. I just tested
 locally with gcc 4.7.0 and gcc 4.8.1, and compilation fails for both, as
 well as for clang-trunk.

 A quick inspection of the code shows why the `transform` call fails to
 compile. There is no overload of `transform` that takes a non-const
 sequence. `fold` is tricker. You would need to dig to find out what's
 going on there.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8775#comment:4>
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:13 UTC