summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2011-02-11 01:23:10 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2011-02-11 01:23:10 +0000
commitcedf52d247f36c9ab31718c1122c2b0402ebafda (patch)
treedd29a6ce342b43e767585fd21f16db790821cb5c /libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc
parentb3a2810309380117ede8655ad53bbf378eecb6a3 (diff)
downloadgcc-cedf52d247f36c9ab31718c1122c2b0402ebafda.tar.gz
Makefile.am (sources): Add regex.cc.
2011-02-10 Benjamin Kosnik <bkoz@redhat.com> * src/Makefile.am (sources): Add regex.cc. * src/Makefile.in: Regenerate. * src/regex.cc: New. * include/bits/regex_error.h (error_type): Use constexpr. (regex_error): Move ctor and dtor out of line. * testsuite/28_regex/03_requirements: To... * testsuite/28_regex/requirements: ... this. * testsuite/28_regex/04_header: To... * testsuite/28_regex/headers: ... this. * testsuite/28_regex/05_constants: To... * testsuite/28_regex/constants: ... this. * testsuite/28_regex/06_exception_type: To... * testsuite/28_regex/regex_error: ... this. * testsuite/28_regex/07_traits: To... * testsuite/28_regex/traits: ... this. * testsuite/28_regex/08_basic_regex: To... * testsuite/28_regex/basic_regex: ... this. * testsuite/28_regex/09_sub_match: To... * testsuite/28_regex/sub_match: ... this. * testsuite/28_regex/10_match_results: To... * testsuite/28_regex/match_results: ... this. * testsuite/28_regex/11_algorithms: To... * testsuite/28_regex/algorithms: ... this. * testsuite/28_regex/12_iterators: To... * testsuite/28_regex/iterators: ... this. From-SVN: r170038
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc')
-rw-r--r--libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc44
1 files changed, 44 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc
new file mode 100644
index 00000000000..2e31a708417
--- /dev/null
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/assign/wchar_t/range.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// [28.8.3] class template basic_regex assign()
+
+#include <regex>
+#include <testsuite_hooks.h>
+
+// Tests range assign of the basic_regex class.
+void test01()
+{
+ typedef std::basic_regex<wchar_t> test_type;
+ bool test __attribute__((unused)) = true;
+
+ wchar_t s[] = L"a+b|c";
+ test_type re;
+ re.assign(s, s + 5);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+};