diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-11 01:23:10 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-11 01:23:10 +0000 |
commit | 616e258d0b08b69083a558491449fbbe443bf3f1 (patch) | |
tree | dd29a6ce342b43e767585fd21f16db790821cb5c /libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc | |
parent | 3b59603e021a703f231bed0742d1ee6a12868527 (diff) | |
download | gcc-616e258d0b08b69083a558491449fbbe443bf3f1.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc')
-rw-r--r-- | libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc new file mode 100644 index 00000000000..efc0597cc1d --- /dev/null +++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/wchar_t/range.cc @@ -0,0 +1,43 @@ +// { dg-do compile } +// { dg-options "-std=c++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.2] class template basic_regex constructor + +#include <regex> +#include <testsuite_hooks.h> + +// Tests range constructor of the basic_regex class. +void test01() +{ + bool test __attribute__((unused)) = true; + typedef std::basic_regex<wchar_t> test_type; + + wchar_t s[] = L"a+b|c"; + test_type re(s, s + 5); +} + +int +main() +{ + test01(); + return 0; +}; |