1 | /* |
2 | * |
3 | * Copyright (c) 1998-2002 |
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 | /* |
13 | * LOCATION: see http://www.boost.org for most recent version. |
14 | * FILE instances.cpp |
15 | * VERSION see <boost/version.hpp> |
16 | * DESCRIPTION: Defines those template instances that are placed in the |
17 | * library rather than in the users object files. |
18 | */ |
19 | |
20 | // |
21 | // note no include guard, we may include this multiple times: |
22 | // |
23 | #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES |
24 | |
25 | namespace boost{ |
26 | |
27 | // |
28 | // this header can be included multiple times, each time with |
29 | // a different character type, BOOST_REGEX_CHAR_T must be defined |
30 | // first: |
31 | // |
32 | #ifndef BOOST_REGEX_CHAR_T |
33 | # error "BOOST_REGEX_CHAR_T not defined" |
34 | #endif |
35 | |
36 | #ifndef BOOST_REGEX_TRAITS_T |
37 | # define BOOST_REGEX_TRAITS_T , boost::regex_traits<BOOST_REGEX_CHAR_T > |
38 | #endif |
39 | |
40 | // |
41 | // what follows is compiler specific: |
42 | // |
43 | |
44 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) |
45 | |
46 | #ifdef BOOST_HAS_ABI_HEADERS |
47 | # include BOOST_ABI_PREFIX |
48 | #endif |
49 | |
50 | # ifndef BOOST_REGEX_INSTANTIATE |
51 | # pragma option push -Jgx |
52 | # endif |
53 | |
54 | template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; |
55 | template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; |
56 | #ifndef BOOST_NO_STD_ALLOCATOR |
57 | template class BOOST_REGEX_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >; |
58 | #endif |
59 | |
60 | # ifndef BOOST_REGEX_INSTANTIATE |
61 | # pragma option pop |
62 | # endif |
63 | |
64 | #ifdef BOOST_HAS_ABI_HEADERS |
65 | # include BOOST_ABI_SUFFIX |
66 | #endif |
67 | |
68 | #elif defined(BOOST_MSVC) || defined(__ICL) |
69 | |
70 | # ifndef BOOST_REGEX_INSTANTIATE |
71 | # ifdef __GNUC__ |
72 | # define template __extension__ extern template |
73 | # else |
74 | # if BOOST_MSVC > 1310 |
75 | # define BOOST_REGEX_TEMPLATE_DECL |
76 | # endif |
77 | # define template extern template |
78 | # endif |
79 | # endif |
80 | |
81 | #ifndef BOOST_REGEX_TEMPLATE_DECL |
82 | # define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL |
83 | #endif |
84 | |
85 | # ifdef BOOST_MSVC |
86 | # pragma warning(push) |
87 | # pragma warning(disable : 4251) |
88 | #if BOOST_MSVC < 1700 |
89 | # pragma warning(disable : 4231) |
90 | #endif |
91 | # if BOOST_MSVC < 1600 |
92 | # pragma warning(disable : 4660) |
93 | # endif |
94 | # endif |
95 | |
96 | template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; |
97 | |
98 | template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; |
99 | #ifndef BOOST_NO_STD_ALLOCATOR |
100 | template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >; |
101 | #endif |
102 | #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\ |
103 | && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\ |
104 | && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\ |
105 | && !defined(BOOST_REGEX_ICU_INSTANCES) |
106 | template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >; |
107 | #ifndef BOOST_NO_STD_ALLOCATOR |
108 | template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >; |
109 | #endif |
110 | #endif |
111 | |
112 | |
113 | # ifdef BOOST_MSVC |
114 | # pragma warning(pop) |
115 | # endif |
116 | |
117 | # ifdef template |
118 | # undef template |
119 | # endif |
120 | |
121 | #undef BOOST_REGEX_TEMPLATE_DECL |
122 | |
123 | #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) |
124 | |
125 | #if defined(__clang__) |
126 | # pragma clang diagnostic push |
127 | # if defined(__APPLE_CC__) |
128 | # if (__clang_major__ > 6) |
129 | # pragma clang diagnostic ignored "-Wkeyword-macro" |
130 | # endif |
131 | # else |
132 | # if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5)) |
133 | # pragma clang diagnostic ignored "-Wkeyword-macro" |
134 | # endif |
135 | # endif |
136 | #endif |
137 | |
138 | # ifndef BOOST_REGEX_INSTANTIATE |
139 | # ifdef __GNUC__ |
140 | # define template __extension__ extern template |
141 | # else |
142 | # define template extern template |
143 | # endif |
144 | # endif |
145 | |
146 | #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES) |
147 | namespace BOOST_REGEX_DETAIL_NS{ |
148 | template BOOST_REGEX_DECL |
149 | std::locale cpp_regex_traits_base<BOOST_REGEX_CHAR_T>::imbue(const std::locale& l); |
150 | |
151 | template BOOST_REGEX_DECL |
152 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type |
153 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; |
154 | template BOOST_REGEX_DECL |
155 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type |
156 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; |
157 | template BOOST_REGEX_DECL |
158 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type |
159 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; |
160 | template BOOST_REGEX_DECL |
161 | void cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::init(); |
162 | template BOOST_REGEX_DECL |
163 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::char_class_type |
164 | cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; |
165 | #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET |
166 | template BOOST_REGEX_DECL |
167 | bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const; |
168 | #endif |
169 | } // namespace |
170 | template BOOST_REGEX_DECL |
171 | boost::intmax_t cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const; |
172 | template BOOST_REGEX_DECL |
173 | std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name); |
174 | template BOOST_REGEX_DECL |
175 | std::string& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name_inst(); |
176 | template BOOST_REGEX_DECL |
177 | std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name(); |
178 | #ifdef BOOST_HAS_THREADS |
179 | template BOOST_REGEX_DECL |
180 | static_mutex& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_mutex_inst(); |
181 | #endif |
182 | #endif |
183 | |
184 | template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& |
185 | basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::do_assign( |
186 | const BOOST_REGEX_CHAR_T* p1, |
187 | const BOOST_REGEX_CHAR_T* p2, |
188 | flag_type f); |
189 | template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::locale_type BOOST_REGEX_CALL |
190 | basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::imbue(locale_type l); |
191 | |
192 | template BOOST_REGEX_DECL void BOOST_REGEX_CALL |
193 | match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign( |
194 | const match_results<const BOOST_REGEX_CHAR_T*>& m); |
195 | |
196 | namespace BOOST_REGEX_DETAIL_NS{ |
197 | template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init( |
198 | const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f); |
199 | template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match(); |
200 | template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find(); |
201 | } // namespace |
202 | |
203 | #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ |
204 | && !defined(BOOST_REGEX_ICU_INSTANCES)\ |
205 | && !defined(__SGI_STL_PORT)\ |
206 | && !defined(_STLPORT_VERSION) |
207 | // std:basic_string<>::const_iterator instances as well: |
208 | template BOOST_REGEX_DECL void BOOST_REGEX_CALL |
209 | match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign( |
210 | const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m); |
211 | |
212 | namespace BOOST_REGEX_DETAIL_NS{ |
213 | template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init( |
214 | const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f); |
215 | template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match(); |
216 | template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find(); |
217 | } // namespace |
218 | #endif |
219 | |
220 | # ifdef template |
221 | # undef template |
222 | # endif |
223 | |
224 | #ifdef __clang__ |
225 | #pragma clang diagnostic pop |
226 | #endif |
227 | #endif |
228 | |
229 | } // namespace boost |
230 | |
231 | #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES |
232 | |
233 | |
234 | |
235 | |
236 | |
237 | |