This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/84087] string::assign problem with two arguments


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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Jul  4 11:44:24 2018
New Revision: 262382

URL: https://gcc.gnu.org/viewcvs?rev=262382&root=gcc&view=rev
Log:
PR libstdc++/84087 add default arguments to basic_string members (LWG 2268)

This change was a DR against C++11 and so should have been implemented
years ago.

Backport from mainline
2018-05-03  Jonathan Wakely  <jwakely@redhat.com>

        PR libstdc++/84087 LWG DR 2268 basic_string default arguments
        * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
        (append(const basic_string&, size_type, size_type)
        (assign(const basic_string&, size_type, size_type)
        (insert(size_type, const basic_string&, size_type, size_type)
        (replace(size_type,size_type,const basic_string&,size_type,size_type)
        (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
        Add default arguments (LWG 2268).
        [_GLIBCXX_USE_CXX11_ABI=0]
        (append(const basic_string&, size_type, size_type)
        (assign(const basic_string&, size_type, size_type)
        (insert(size_type, const basic_string&, size_type, size_type)
        (replace(size_type,size_type,const basic_string&,size_type,size_type)
        (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
        Likewise.
        * testsuite/21_strings/basic_string/dr2268.cc: New test.

Added:
   
branches/gcc-8-branch/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc
Modified:
    branches/gcc-8-branch/libstdc++-v3/ChangeLog
    branches/gcc-8-branch/libstdc++-v3/include/bits/basic_string.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]