You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Anton Pevtsov (JIRA)" <ji...@apache.org> on 2006/01/17 15:20:42 UTC
[jira] Created: (STDCXX-121) std::search_n() assumes Size can be
incremented
std::search_n() assumes Size can be incremented
-----------------------------------------------
Key: STDCXX-121
URL: http://issues.apache.org/jira/browse/STDCXX-121
Project: STDCXX
Type: Bug
Components: 25. Algorithms
Versions: 4.1.2, 4.1.3
Environment: all
Reporter: Anton Pevtsov
Priority: Minor
$ cat t.cpp && make t
#include <algorithm>
struct Size
{
operator int() { return 0; }
private:
void operator=(Size&);
};
template int* std::search_n(int*, int*, Size, const int&, int (*)(int, int));
int main() { return 0; }
./include/algorithm.cc: In function '_FwdIter std::__search_n(_FwdIter, _FwdIter, _Dist*, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Dist = int, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]':
./include/algorithm:304: instantiated from '_FwdIter std::search_n(_FwdIter, _FwdIter, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]'
t.cpp:11: instantiated from here
./include/algorithm.cc:303: error: conversion from 'int' to non-scalar type 'Size' requested
./include/algorithm.cc:311: error: no match for 'operator=' in '__matches = 0'
t.cpp:8: note: candidates are: void Size::operator=(Size&)
./include/algorithm.cc:315: error: no match for 'operator++' in '++__matches'
make: *** [t.o] Error 1
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (STDCXX-121) std::search_n() assumes Size can be
incremented
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-121?page=all ]
Martin Sebor reassigned STDCXX-121:
-----------------------------------
Assign To: Martin Sebor
> std::search_n() assumes Size can be incremented
> -----------------------------------------------
>
> Key: STDCXX-121
> URL: http://issues.apache.org/jira/browse/STDCXX-121
> Project: STDCXX
> Type: Bug
> Components: 25. Algorithms
> Versions: 4.1.2, 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
>
> $ cat t.cpp && make t
> #include <algorithm>
> struct Size
> {
> operator int() { return 0; }
> private:
> void operator=(Size&);
> };
> template int* std::search_n(int*, int*, Size, const int&, int (*)(int, int));
> int main() { return 0; }
> ./include/algorithm.cc: In function '_FwdIter std::__search_n(_FwdIter, _FwdIter, _Dist*, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Dist = int, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]':
> ./include/algorithm:304: instantiated from '_FwdIter std::search_n(_FwdIter, _FwdIter, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]'
> t.cpp:11: instantiated from here
> ./include/algorithm.cc:303: error: conversion from 'int' to non-scalar type 'Size' requested
> ./include/algorithm.cc:311: error: no match for 'operator=' in '__matches = 0'
> t.cpp:8: note: candidates are: void Size::operator=(Size&)
> ./include/algorithm.cc:315: error: no match for 'operator++' in '++__matches'
> make: *** [t.o] Error 1
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (STDCXX-121) std::search_n() assumes Size can be
incremented
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-121?page=all ]
Martin Sebor resolved STDCXX-121:
---------------------------------
Fix Version: 4.1.4
Resolution: Fixed
Fixed with the referenced change.
> std::search_n() assumes Size can be incremented
> -----------------------------------------------
>
> Key: STDCXX-121
> URL: http://issues.apache.org/jira/browse/STDCXX-121
> Project: C++ Standard Library
> Type: Bug
> Components: 25. Algorithms
> Versions: 4.1.2, 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.1.4
>
> $ cat t.cpp && make t
> #include <algorithm>
> struct Size
> {
> operator int() { return 0; }
> private:
> void operator=(Size&);
> };
> template int* std::search_n(int*, int*, Size, const int&, int (*)(int, int));
> int main() { return 0; }
> ./include/algorithm.cc: In function '_FwdIter std::__search_n(_FwdIter, _FwdIter, _Dist*, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Dist = int, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]':
> ./include/algorithm:304: instantiated from '_FwdIter std::search_n(_FwdIter, _FwdIter, _Size, const _TypeT&, _BinaryPredicate) [with _FwdIter = int*, _Size = Size, _TypeT = int, _BinaryPredicate = int (*)(int, int)]'
> t.cpp:11: instantiated from here
> ./include/algorithm.cc:303: error: conversion from 'int' to non-scalar type 'Size' requested
> ./include/algorithm.cc:311: error: no match for 'operator=' in '__matches = 0'
> t.cpp:8: note: candidates are: void Size::operator=(Size&)
> ./include/algorithm.cc:315: error: no match for 'operator++' in '++__matches'
> make: *** [t.o] Error 1
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira