Re: [Boost-bugs] [Boost C++ Libraries] #4189: Add better support for non-default constructible function objects

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4189: Add better support for non-default constructible function objects
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-22 04:47:17


#4189: Add better support for non-default constructible function objects
-------------------------------+--------------------------------
  Reporter: djwalker | Owner: jeffrey.hellrung
      Type: Feature Requests | Status: new
 Milestone: Boost 1.43.0 | Component: iterator
   Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: transform_iterator
-------------------------------+--------------------------------

Comment (by dave):

 As far as {{{transform_iterator}}} is concerned, there's nothing it can do
 about non-default-constructible function objects in C++03 without also
 penalizing uses of default-constructible function objects. If there's a
 C++11 type trait that allows detection of deleted default ctors that would
 sort of let the iterator library introduce the {{{optional<F>}}} wrapper
 itself, but it wouldn't help if the default ctor was private. My
 suggestion here would be to create a generic forwarding function object
 wrapper around {{{optional<F>}}} and use that as the function object for
 your {{{transform_iterator}}}.

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