Merged trunk at revision 161680 into branch.
[official-gcc.git] / libstdc++-v3 / testsuite / 28_regex / 05_constants / match_flag_type.cc
blob10635ff5f7f9c45fc42d3a83dc5631b6d90f9054
1 // { dg-options "-std=c++0x" }
2 // { dg-do compile }
3 //
4 // 2009-06-17 Stephen M. Webb <stephen.webb@xandros.com>
5 //
6 // Copyright (C) 2009 Free Software Foundation, Inc.
7 //
8 // This file is part of the GNU ISO C++ Library. This library is free
9 // software; you can redistribute it and/or modify it under the
10 // terms of the GNU General Public License as published by the
11 // Free Software Foundation; either version 3, or (at your option)
12 // any later version.
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License along
20 // with this library; see the file COPYING3. If not see
21 // <http://www.gnu.org/licenses/>.
23 // 28.5.1
25 #include <regex>
26 #include <testsuite_hooks.h>
28 void
29 test01()
31 bool test __attribute__((unused)) = true;
33 std::regex_constants::match_flag_type flag = std::regex_constants::match_default;
35 flag |= std::regex_constants::match_not_bol;
36 flag |= std::regex_constants::match_not_eol;
37 flag |= std::regex_constants::match_not_bow;
38 flag |= std::regex_constants::match_not_eow;
39 flag |= std::regex_constants::match_any;
40 flag |= std::regex_constants::match_not_null;
41 flag |= std::regex_constants::match_continuous;
42 flag |= std::regex_constants::match_prev_avail;
43 flag |= std::regex_constants::format_default;
44 flag |= std::regex_constants::format_sed;
45 flag |= std::regex_constants::format_no_copy;
46 flag |= std::regex_constants::format_first_only;
49 int main()
51 test01();
52 return 0;