]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/regex/test/concepts/concept_check.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / regex / test / concepts / concept_check.cpp
1 /*
2 *
3 * Copyright (c) 2003
4 * John Maddock
5 *
6 * Use, modification and distribution are subject to the
7 * Boost Software License, Version 1.0. (See accompanying file
8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 *
10 */
11
12 #include <boost/regex.hpp>
13 #include <boost/config.hpp>
14
15 #if defined(BOOST_MSVC)
16 // this lets us compile at warning level 4 without seeing concept-check related warnings
17 # pragma warning(disable:4100)
18 #endif
19 #ifdef BOOST_BORLANDC
20 #pragma option -w-8019 -w-8004 -w-8008
21 #endif
22 #ifdef BOOST_INTEL
23 #pragma warning(disable:1418 981 983 595 383)
24 #endif
25
26 #include <boost/regex/concepts.hpp>
27
28
29 int main()
30 {
31 boost::function_requires<
32 boost::RegexTraitsConcept<
33 boost::regex_traits<char>
34 >
35 >();
36 #ifndef BOOST_NO_STD_LOCALE
37 boost::function_requires<
38 boost::BoostRegexConcept<
39 boost::basic_regex<char, boost::cpp_regex_traits<char> >
40 >
41 >();
42 #ifndef BOOST_NO_WREGEX
43 boost::function_requires<
44 boost::BoostRegexConcept<
45 boost::basic_regex<wchar_t, boost::cpp_regex_traits<wchar_t> >
46 >
47 >();
48 #endif
49 #endif
50 boost::function_requires<
51 boost::BoostRegexConcept<
52 boost::basic_regex<char, boost::c_regex_traits<char> >
53 >
54 >();
55 #ifndef BOOST_NO_WREGEX
56 boost::function_requires<
57 boost::BoostRegexConcept<
58 boost::basic_regex<wchar_t, boost::c_regex_traits<wchar_t> >
59 >
60 >();
61 #endif
62 #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
63 boost::function_requires<
64 boost::BoostRegexConcept<
65 boost::basic_regex<char, boost::w32_regex_traits<char> >
66 >
67 >();
68 #ifndef BOOST_NO_WREGEX
69 boost::function_requires<
70 boost::BoostRegexConcept<
71 boost::basic_regex<wchar_t, boost::w32_regex_traits<wchar_t> >
72 >
73 >();
74 #endif
75 #endif
76 //
77 // now test the regex_traits concepts:
78 //
79 typedef boost::basic_regex<char, boost::regex_traits_architype<char> > regex_traits_tester_type1;
80 boost::function_requires<
81 boost::BoostRegexConcept<
82 regex_traits_tester_type1
83 >
84 >();
85 typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype> > regex_traits_tester_type2;
86 boost::function_requires<
87 boost::BaseRegexConcept<
88 regex_traits_tester_type2
89 >
90 >();
91 return 0;
92 }
93
94