public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/gccgo] libstdc++: Fix outdated comment about std::string instantiations (PR 94854)
@ 2020-07-12 17:41 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2020-07-12 17:41 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:8f1591763fd50b143af0dc1770741f326a97583a
commit 8f1591763fd50b143af0dc1770741f326a97583a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 29 18:57:34 2020 +0100
libstdc++: Fix outdated comment about std::string instantiations (PR 94854)
PR libstdc++/94854
* include/bits/basic_string.tcc: Update comment about explicit
instantiations.
Diff:
---
libstdc++-v3/ChangeLog | 6 ++++++
libstdc++-v3/include/bits/basic_string.tcc | 10 +++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f8cf71e057f..2032e90abeb 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-29 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/94854
+ * include/bits/basic_string.tcc: Update comment about explicit
+ instantiations.
+
2020-04-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91480
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index e78bb2c14b3..e370f439390 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -1609,11 +1609,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
#if _GLIBCXX_EXTERN_TEMPLATE
- // The explicit instantiations definitions in src/c++11/string-inst.cc
- // are compiled as C++14, so the new C++17 members aren't instantiated.
- // Until those definitions are compiled as C++17 suppress the declaration,
- // so C++17 code will implicitly instantiate std::string and std::wstring
- // as needed.
+ // The explicit instantiation definitions in src/c++11/string-inst.cc and
+ // src/c++17/string-inst.cc only instantiate the members required for C++17
+ // and earlier standards (so not C++20's starts_with and ends_with).
+ // Suppress the explicit instantiation declarations for C++20, so C++20
+ // code will implicitly instantiate std::string and std::wstring as needed.
# if __cplusplus <= 201703L && _GLIBCXX_EXTERN_TEMPLATE > 0
extern template class basic_string<char>;
# elif ! _GLIBCXX_USE_CXX11_ABI
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-12 17:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12 17:41 [gcc/devel/gccgo] libstdc++: Fix outdated comment about std::string instantiations (PR 94854) Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).