This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[PATCH] Add non-const std::basic_string::data() for C++17


This is a minimal version of the change I reverted recently. This adds
the non-const data() overload, without supporting fancy pointers for
allocator_type::pointer and without needing to export the new function
(because we suppress the explicit instantiation declarations for C++17
now).

	* include/bits/basic_string.h (data() const): Update comment.
	(data()): Add non-const overload for C++17.
	* testsuite/21_strings/basic_string/operations/data/char/2.cc: New.
	* testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc: New.

Tested powerpc64-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


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