[Boost-bugs] [Boost C++ Libraries] #5811: indirected range adaptor not satisfied with unary dereference operator

Subject: [Boost-bugs] [Boost C++ Libraries] #5811: indirected range adaptor not satisfied with unary dereference operator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-25 19:17:26


#5811: indirected range adaptor not satisfied with unary dereference operator
------------------------------------------------------------+---------------
 Reporter: Lars Viklund <zao@…> | Owner: neilgroves
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
  Version: Boost Development Trunk | Severity: Problem
 Keywords: optional element_type range adaptor indirected |
------------------------------------------------------------+---------------
 The documentation for Range's indirected adaptor claims that it is usable
 with anything that has an unary operator*().

 When using it with a range of optional<int>, it seems to require an
 element_type inner type, which optional doesn't expose and the docs does
 not require.

 The following testcase fails to compile with VC10 and GCC 4.2.3:

 {{{#!c++
 #include <boost/optional.hpp>
 #include <boost/range/adaptors.hpp>
 #include <vector>

 int main(int argc, char* argv[])
 {
         std::vector<boost::optional<int> > v;
         v | boost::adaptors::indirected;
 }
 }}}

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