[Bug libstdc++/31555] New: stable_partition assumes iterator difference type is always ptrdiff_t
djg at cray dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 18:08:00 GMT 2007
Instantiating stable_partition with an iterator where the difference_type is
something different than ptrdiff_t results in an error like this:
.../bits/stl_algo.h: In function `_ForwardIterator
std::stable_partition(_ForwardIterator, _ForwardIterator, _Predicate) [with
_ForwardIterator = my_iterator, _Predicate = bool (*)(double)]':
test.c:32: instantiated from here
.../bits/stl_algo.h:2154: error: no matching function for call to
`__stable_partition_adaptive(my_iterator&, my_iterator&, bool (*&)(double),
short int, double*, ptrdiff_t)'
The __stable_parition_adaptive effectively requires the __len and __buffer_size
arguments to have the same type, and stable_parition calls it with one of them
always as ptrdiff_t.
--
Summary: stable_partition assumes iterator difference type is
always ptrdiff_t
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: djg at cray dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31555
More information about the Gcc-bugs
mailing list