
| Key: |
STDCXX-292
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Martin Sebor
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Time Tracking:
|
|
Original Estimate:
|
4h
|
|
|
Remaining Estimate:
|
4h
|
|
|
Time Spent:
|
Not Specified
|
|
|
|
From http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200609.mbox/%3c451C1D61.1030807@roguewave.com%3e:
This fails to compile without debugging iterators:
#include <string>
int main ()
{
std::string s;
unsigned n = 3;
s.insert (0, n, 'x');
}
$ make t
gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/gcc-4.1.0-8s/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -O2 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long t.cpp
t.cpp: In function 'int main()':
t.cpp:7: error: call of overloaded 'insert(int, unsigned int&, char)' is ambiguous
/build/sebor/dev/stdlib/include/string:520: note: candidates are: void std::basic_string<_CharT, _Traits, _Allocator>::insert(typename _Allocator::pointer, typename _Allocator::size_type, typename _Traits::char_type) [with _CharT = char, _Traits = std::char_traits<char>, _Allocator = std::allocator<char>]
/build/sebor/dev/stdlib/include/string:525: note: std::basic_string<_CharT, _Traits, _Allocator>& std::basic_string<_CharT, _Traits, _Allocator>::insert(typename _Allocator::size_type, typename _Allocator::size_type, typename _Traits::char_type) [with _CharT = char, _Traits = std::char_traits<char>, _Allocator = std::allocator<char>]
make: *** [t.o] Error 1
|
|
Description
|
From http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200609.mbox/%3c451C1D61.1030807@roguewave.com%3e:
This fails to compile without debugging iterators:
#include <string>
int main ()
{
std::string s;
unsigned n = 3;
s.insert (0, n, 'x');
}
$ make t
gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/gcc-4.1.0-8s/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -O2 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long t.cpp
t.cpp: In function 'int main()':
t.cpp:7: error: call of overloaded 'insert(int, unsigned int&, char)' is ambiguous
/build/sebor/dev/stdlib/include/string:520: note: candidates are: void std::basic_string<_CharT, _Traits, _Allocator>::insert(typename _Allocator::pointer, typename _Allocator::size_type, typename _Traits::char_type) [with _CharT = char, _Traits = std::char_traits<char>, _Allocator = std::allocator<char>]
/build/sebor/dev/stdlib/include/string:525: note: std::basic_string<_CharT, _Traits, _Allocator>& std::basic_string<_CharT, _Traits, _Allocator>::insert(typename _Allocator::size_type, typename _Allocator::size_type, typename _Traits::char_type) [with _CharT = char, _Traits = std::char_traits<char>, _Allocator = std::allocator<char>]
make: *** [t.o] Error 1
|
Show » |
| There are no subversion log entries for this issue yet.
|
|