Subject: [Boost-bugs] [Boost C++ Libraries] #1262: [Boost.Iterators] Reasoning for boost::pointee<> not supporting back_insert_iterator?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-09-13 19:31:18
#1262: [Boost.Iterators] Reasoning for boost::pointee<> not supporting
back_insert_iterator?
-------------------------------------------------------+--------------------
Reporter: Richard Hazlewood <richard_at_hazlewoods.eu> | Owner: dave
Type: Support Requests | Status: new
Milestone: To Be Determined | Component: iterator
Version: Boost 1.34.1 | Severity: Not Applicable
Keywords: pointee iterator back_insert_iterator |
-------------------------------------------------------+--------------------
The C++ Standard specifies that ''std::back_insert_iterator'' does not
pass the ''value_type'' down to the base output-iterator class. This
means (by default) that the ''value_type'' is typed to ''void'' and thus
unsuitable for ''boost::pointee'' to determine the value type.
E.g.:
{{{
typedef std::vector<int> Ints;
typedef std::back_insert_iterator<Ints> Iter;
typedef boost::pointee<Iter>::type IntType; // Errors
}}}
The following specialization can be used to support
''back_insert_iterator'':
{{{
namespace boost
{
template <class T>
struct pointee<std::back_insert_iterator<T> >
{
typedef typename T::value_type type;
};
}
}}}
Is there a particular reasoning why this is not available in the library?
Note: this also applies to ''std::front_insert_iterator''.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1262>
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:49:56 UTC