id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11029,"Overloading ambiguity between basic_string & insert(0,...) and iterator insert(0,...)",sergey.sprogis@…,John Maddock,"1. Description of the failure Let's consider the following 7 line t.cc test: #include #include int main() { std::string s; s.insert(0, 1, '1'); std::cout << s << std::endl; } Its complation on Solaris 11.2 with Oracle Studio 12.4 C++ compiler using -library=stlport4 option (which tells compiler to use STL Standard library) produces the following error messages ""l.cc"", line 6: Error: Overloading ambiguity between ""std::string::insert(char*, unsigned, char)"" and ""std::string::insert(unsigned, unsigned, char)"". The similar code containing .insert(0,,''); exist in the following 7 headers of multiprecision library: multiprecision/tommath.hpp, multiprecision/cpp_dec_float.hpp, multiprecision/cpp_bin_float/io.hpp, multiprecision/cpp_int.hpp, multiprecision/number.hpp, multiprecision/detail/number_base.hpp, multiprecision/detail/float_string_cvt.hpp which is the reason for numerous compilation failures in regression unit tests of multiprecision library when any of 3 Standard librarries (Apache, STL, RW) are used with Studio 12.4 C++ compiler. 2. Cause of the failure. This failure is a direct consequence of STL implementation detail for string iterators. C++ standard requires STL to provide the following string::insert member functions: basic_string& insert(size_type pos, size_type n, charT c); iterator insert(const_iterator p, size_type n, charT c); Unfortunately, iterator for strings in stlport4 is implemented as 'char *' and that causes the following call to match both of these insert functions: insert(0, 1, '1'); That happens because 0 is a valid value both for 'size_type' and 'iterator'. And that naturally leads to the compilation failure shown above. So its not a compiler problem but rather incompatibility between Boost sources and these STLs. 3. Possible Solution. To replace all lines: .insert(0,,''); with: .insert(std::string::size_type(0),''); in 7 boost header files listed above.",Bugs,closed,To Be Determined,multiprecision,Boost 1.57.0,Problem,fixed,,