Re: [Boost-bugs] [Boost C++ Libraries] #5096: display_expr is noncopyable

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5096: display_expr is noncopyable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-22 21:13:56


#5096: display_expr is noncopyable
--------------------------------------+-------------------------------------
  Reporter: cschmidt | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: proto
   Version: Boost Development Trunk | Severity: Problem
Resolution: fixed | Keywords:
--------------------------------------+-------------------------------------

Comment (by cschmidt):

 Strictly speaking, [68314] defers the problem to
 detail::display_expr_impl, which is passed to fusion::for_each in
 display_expr_impl::impl although it is noncopyable. This is fine for now
 as Fusion passes around functors by const reference although the
 documentation states the opposite.

 https://github.com/ryppl/boost-
 svn/blob/fad63fe4389e8a46e8ea9183eae46e401ea4bb6f/boost/fusion/algorithm/iteration/for_each.hpp
 http://www.boost.org/doc/libs/1_45_0/libs/fusion/doc/html/fusion/algorithm/iteration/functions/for_each.html

 AFAIK Fusion's current implementation is plain wrong. Functors should
 never be passed around by const reference. IIRC that's due to a defect in
 C++98.

 Anyway, wontfix/invalid is fine for me for now. I will try to propose a
 patch for fusion that removes const/reference qualifiers on functors and
 adds support for reference wrappers.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5096#comment:3>
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:05 UTC