Opened 12 years ago
Closed 8 years ago
#4909 closed Bugs (wontfix)
class path funcs taking iterators making poor assumption
Reported by: | Beman Dawes | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | Boost 1.46.0 | Component: | filesystem |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
class path funcs taking iterators are assuming the value_type of the iterator is a character type. But it is perfectly natural to write something like path p(q.begin(), q.end()) where q is a path or a vector of strings, so the value type is a container.
The fix is to add several overloads depending on the value_type of the iterator.
The rule-of-thumb might be something like "if the operation has an overload of a single item of type T, it should also handle iteration over a sequence of T's.
Note:
See TracTickets
for help on using tickets.
The motivation for this change is not strong enough to justify deviating from the ISO File System Technical Specification.
--Beman