incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Zhong" <sco...@roguewave.com>
Subject string insert parameter ambiguous
Date Thu, 28 Sep 2006 18:37:39 GMT
std::string xmant = x.before_ + x.after_;

if (y.before_.length() > x.before_.length()) {

    xmant.insert(0, y.before_.length() - x.before_.length(), '0' );

  }

 

gcc -D_RWCONFIG=12d -I. -I./../../../../include -I.. -fPIC -O2 -pthread
-ftemplate-depth-32 -D_RWCONFIG=12d -I/build/sourcepro/include -c
../t.cpp

 

call of overloaded `insert(int, unsigned int, char)' is

   ambiguous

/build/sourcepro/include/string:406: candidates

   are: std::basic_string<_CharT, _Traits, _Allocator>&

   std::basic_string<_CharT, _Traits,

   _Allocator>::insert(_Allocator::size_type, _Allocator::const_pointer,

   _Allocator::size_type) [with _CharT = char, _Traits =

   std::char_traits<char>, _Allocator = std::allocator<char>] <near
match>

/build/sourcepro/include/string:434:

         void std::basic_string<_CharT, _Traits,

   _Allocator>::insert(_Allocator::pointer, _Allocator::const_pointer,

   _Allocator::const_pointer) [with _CharT = char, _Traits =

   std::char_traits<char>, _Allocator = std::allocator<char>] <near
match>

/build/sourcepro/include/string:444:

         void std::basic_string<_CharT, _Traits,

   _Allocator>::insert(_Allocator::pointer, _Allocator::pointer,

   _Allocator::pointer) [with _CharT = char, _Traits =
std::char_traits<char>,

   _Allocator = std::allocator<char>] <near match>

/build/sourcepro/include/string:470:

         void std::basic_string<_CharT, _Traits,

   _Allocator>::insert(_Allocator::pointer, _Allocator::size_type,

   _Traits::char_type) [with _CharT = char, _Traits =
std::char_traits<char>,

   _Allocator = std::allocator<char>]

/build/sourcepro/include/string:475:

         std::basic_string<_CharT, _Traits, _Allocator>&

   std::basic_string<_CharT, _Traits,

   _Allocator>::insert(_Allocator::size_type, _Allocator::size_type,

   _Traits::char_type) [with _CharT = char, _Traits =
std::char_traits<char>,

   _Allocator = std::allocator<char>]


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message