[Boost-bugs] [Boost C++ Libraries] #12068: boost::filtered_range is not default constructible

Subject: [Boost-bugs] [Boost C++ Libraries] #12068: boost::filtered_range is not default constructible
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-14 15:50:49


#12068: boost::filtered_range is not default constructible
-------------------------------------+-------------------------------------
 Reporter: Aleksej Lebedev | Type: Bugs
  <root@…> | Milestone: To Be Determined
   Status: new | Version: Boost 1.59.0
Component: None | Keywords: filtered_range,
 Severity: Problem | adaptors
-------------------------------------+-------------------------------------
 Filtered_range is not default_constructible which makes it impossible to
 (for example) put it into a class that has to be default-initialized and
 resets it (filtered_range) later.

 I'm quite new to boost internals, but I fail to see any drawbacks of
 adding the default constructor:

 --- include/boost/range/adaptor/filtered.hpp.orig 2016-03-14
 15:26:32.228892237 +0100
 +++ include/boost/range/adaptor/filtered.hpp 2016-03-14
 15:26:28.724846102 +0100
 @@ -41,6 +41,8 @@
              typedef typename default_constructible_unary_fn_gen<P,
 bool>::type
                  pred_t;

 + filtered_range() {}
 +
              filtered_range(P p, R& r)
              : base(make_filter_iterator(pred_t(p),
                                          boost::begin(r), boost::end(r)),

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12068>
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:19 UTC