This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Partial solution to LWG 523
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Tim Shen <timshen at google dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Nov 2016 13:03:24 +0000
- Subject: Re: [PATCH] Partial solution to LWG 523
- Authentication-results: sourceware.org; auth=none
- References: <CAG4ZjNm2D+Kr30EEUy1L0vCec6JFW_ZT9cNLP5rj3Ej5yTOV+w@mail.gmail.com>
On 26/11/16 16:27 -0800, Tim Shen wrote:
@@ -235,23 +242,86 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_StrTransT
_M_transform(_CharT __ch) const
{
- return _M_transform_impl(__ch, typename integral_constant<bool,
- __collate>::type());
+ _StrTransT __str = _StrTransT(1, __ch);
I know the copy will be elided, but this could be:
_StrTransT __str(1, __ch);
Not a big deal though.
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 953aa87..2fb70b7 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -1000,7 +1000,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
element_type&
operator*() const noexcept
{
- __glibcxx_assert(_M_ptr != nullptr);
+ __glibcxx_assert(_M_get() != nullptr);
return *_M_get();
}
Oops, thanks, but let's fix this separately (I'll do it now) so the
rest of the patch only touches regex stuff.
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/icase.cc b/libstdc++-v3/testsuite/28_regex/traits/char/icase.cc
new file mode 100644
index 0000000..6b2d9ee
--- /dev/null
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/icase.cc
@@ -0,0 +1,75 @@
+// { dg_do run }
+// { dg-do run { target c++11 } }
The first dg-do should be removed.
OK for trunk with those changes, thanks.