https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86272

            Bug ID: 86272
           Summary: __gnu_debug::string uses undefined
                    __glibcxx_check_insert_range2
           Product: gcc
           Version: 8.1.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <debug/string>

int main()
{
  __gnu_debug::string s;
  const char* c = "c";
  s.insert(s.begin(), c, c+1);
}

In file included from ds.cc:1:
/home/jwakely/gcc/9/include/c++/9.0.0/debug/string: In instantiation of 'void
__gnu_debug::basic_string<_CharT, _Traits,
_Allocator>::insert(__gnu_debug::basic_string<_CharT, _Traits,
_Allocator>::iterator, _InputIterator, _InputIterator) [with _InputIterator =
const char*; _CharT = char; _Traits = std::char_traits<char>; _Allocator =
std::allocator<char>; __gnu_debug::basic_string<_CharT, _Traits,
_Allocator>::iterator =
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<char*,
std::__cxx11::basic_string<char> >, __gnu_debug::basic_string<char> >; typename
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator =
__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >]':
ds.cc:7:29:   required from here
/home/jwakely/gcc/9/include/c++/9.0.0/debug/string:568:31: error:
'__glibcxx_check_insert_range2' was not declared in this scope
  __glibcxx_check_insert_range2(__p, __first, __last, __dist);
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to