]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
create_testsuite_files: Add testsuite/experimental in the list of folders to search...
authorFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 20 Jan 2014 21:15:13 +0000 (21:15 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 20 Jan 2014 21:15:13 +0000 (21:15 +0000)
2014-01-20  François Dumont  <fdumont@gcc.gnu.org>

* scripts/create_testsuite_files: Add testsuite/experimental in
the list of folders to search for tests.
* include/experimental/string_view
(basic_string_view<>::operator[]): Comment _GLIBCXX_DEBUG_ASSERT,
incompatible with constexpr qualifier.
(basic_string_view<>::front()): Likewise.
(basic_string_view<>::back()): Likewise.
* testsuite/experimental/string_view/element_access/wchar_t/2.cc:
Merge dg-options directives into one.
* testsuite/experimental/string_view/element_access/char/2.cc:
Likewise. Remove invalid experimental namespace scope on
string_view_type.

From-SVN: r206859

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/string_view
libstdc++-v3/testsuite/experimental/string_view/element_access/char/2.cc
libstdc++-v3/testsuite/experimental/string_view/element_access/wchar_t/2.cc

index 32f3f36a91b837a177ec224a3ced14350ffef6da..c25e0f31b5ccaa05def5003aa0ba67d1a5716c25 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-20  François Dumont  <fdumont@gcc.gnu.org>
+
+       * scripts/create_testsuite_files: Add testsuite/experimental in
+       the list of folders to search for tests.
+       * include/experimental/string_view
+       (basic_string_view<>::operator[]): Comment _GLIBCXX_DEBUG_ASSERT,
+       incompatible with constexpr qualifier.
+       (basic_string_view<>::front()): Likewise.
+       (basic_string_view<>::back()): Likewise.
+       * testsuite/experimental/string_view/element_access/wchar_t/2.cc:
+       Merge dg-options directives into one.
+       * testsuite/experimental/string_view/element_access/char/2.cc:
+       Likewise. Remove invalid experimental namespace scope on
+       string_view_type.
+
 2014-01-20  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/56267
index 806adcdf91b95ac5cae51a28f13b317456eefe03..ab6943d806bce74129c74d9448f57a6fe93c7f48 100644 (file)
@@ -181,7 +181,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       constexpr const _CharT&
       operator[](size_type __pos) const
       {
-       _GLIBCXX_DEBUG_ASSERT(__pos <= this->_M_len);
+       // TODO: Assert to restore in a way compatible with the constexpr.
+       // _GLIBCXX_DEBUG_ASSERT(__pos <= this->_M_len);
        return *(this->_M_str + __pos);
       }
 
@@ -200,14 +201,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       constexpr const _CharT&
       front() const
       {
-       _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0);
+       // TODO: Assert to restore in a way compatible with the constexpr.
+       // _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0);
        return *this->_M_str;
       }
 
       constexpr const _CharT&
       back() const
       {
-       _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0);
+       // TODO: Assert to restore in a way compatible with the constexpr.
+       // _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0);
        return *(this->_M_str + this->_M_len - 1);
       }
 
index 949561fcfe91dcb019d6abd24ab18bd26a11d6d5..ef2fcc0e5d5eca2b8709e98eb9270dbeaf30f251 100644 (file)
@@ -1,6 +1,5 @@
-// { dg-options "-std=gnu++1y" }
 // { dg-do run { xfail *-*-* } }
-// { dg-options "-O0" }
+// { dg-options "-std=gnu++1y -O0" }
 // { dg-require-debug-mode "" }
 
 // Copyright (C) 2013-2014 Free Software Foundation, Inc.
@@ -26,6 +25,6 @@ int
 main()
 {
   typedef std::experimental::string_view string_view_type;
-  experimental::string_view_type s;
+  string_view_type s;
   s[0]; // abort
 }
index 02f24af5750e357bcc7d3647f2ed33d1750dadd9..4ffa7ddfe3806e972026509616a40dbadbb0bedd 100644 (file)
@@ -1,6 +1,5 @@
-// { dg-options "-std=gnu++1y" }
 // { dg-do run { xfail *-*-* } }
-// { dg-options "-O0" }
+// { dg-options "-std=gnu++1y -O0" }
 // { dg-require-debug-mode "" }
 
 // Copyright (C) 2013-2014 Free Software Foundation, Inc.