1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/*
*
* Copyright (c) 2003
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
// this lets us compile at warning level 4 without seeing concept-check related warnings
# pragma warning(disable:4100)
#endif
#ifdef __BORLANDC__
#pragma option -w-8019 -w-8004 -w-8008
#endif
#ifdef BOOST_INTEL
#pragma warning(disable:1418 981 983 595 383)
#endif
#include <boost/regex.hpp>
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(_MSC_VER, < 1310) && !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__GNUC__, < 3)
#include <boost/regex/concepts.hpp>
#endif
int main()
{
// VC6 and VC7 can't cope with the iterator architypes,
// don't bother testing as it doesn't work:
#if !BOOST_WORKAROUND(_MSC_VER, < 1310) && !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__GNUC__, < 3)
boost::function_requires<
boost::RegexTraitsConcept<
boost::regex_traits<char>
>
>();
#ifndef BOOST_NO_STD_LOCALE
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::cpp_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::cpp_regex_traits<wchar_t> >
>
>();
#endif
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::c_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::c_regex_traits<wchar_t> >
>
>();
#endif
#endif
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::w32_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::w32_regex_traits<wchar_t> >
>
>();
#endif
#endif
//
// now test the regex_traits concepts:
//
typedef boost::basic_regex<char, boost::regex_traits_architype<char> > regex_traits_tester_type1;
boost::function_requires<
boost::BoostRegexConcept<
regex_traits_tester_type1
>
>();
#if !defined(__MWERKS__) && !defined(__SUNPRO_CC) // MWCW tries to instantiate std::basic_string<boost::char_architype>, not sure whose bug this is....
typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype> > regex_traits_tester_type2;
boost::function_requires<
boost::BaseRegexConcept<
regex_traits_tester_type2
>
>();
#endif // __MWERKS__
#endif
return 0;
}
|