Opened 15 years ago
Closed 13 years ago
#1262 closed Feature Requests (wontfix)
[Boost.Iterators] Reasoning for boost::pointee<> not supporting back_insert_iterator?
Reported by: | Owned by: | Dave Abrahams | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iterator |
Version: | Boost 1.34.1 | Severity: | Problem |
Keywords: | pointee iterator back_insert_iterator | Cc: |
Description
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.
Change History (2)
comment:1 by , 14 years ago
Severity: | Not Applicable → Problem |
---|---|
Status: | new → assigned |
Type: | Support Requests → Feature Requests |
comment:2 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Since it isn't possible in general to support this for all output iterators, this would be a special case. As such, it especially needs documentation. Since I don't have a doc patch or even a plaintext description of the required doc changes, I'm going to close this one as wontfix.
It was overlooked, I guess. If you want to add it, it would help to have patches for the library, documentation (source .rst files), and tests.