3 * Copyright (c) 1998-2002
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)
13 * LOCATION: see http://www.boost.org for most recent version.
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.
21 // note no include guard, we may include this multiple times:
23 #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
28 // this header can be included multiple times, each time with
29 // a different character type, BOOST_REGEX_CHAR_T must be defined
32 #ifndef BOOST_REGEX_CHAR_T
33 # error "BOOST_REGEX_CHAR_T not defined"
36 #ifndef BOOST_REGEX_TRAITS_T
37 # define BOOST_REGEX_TRAITS_T , boost::regex_traits<BOOST_REGEX_CHAR_T >
41 // what follows is compiler specific:
44 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
46 #ifdef BOOST_HAS_ABI_HEADERS
47 # include BOOST_ABI_PREFIX
50 # ifndef BOOST_REGEX_INSTANTIATE
51 # pragma option push -Jgx
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::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
60 # ifndef BOOST_REGEX_INSTANTIATE
64 #ifdef BOOST_HAS_ABI_HEADERS
65 # include BOOST_ABI_SUFFIX
68 #elif defined(BOOST_MSVC) || defined(__ICL)
70 # ifndef BOOST_REGEX_INSTANTIATE
72 # define template __extension__ extern template
74 # if BOOST_MSVC > 1310
75 # define BOOST_REGEX_TEMPLATE_DECL
77 # define template extern template
81 #ifndef BOOST_REGEX_TEMPLATE_DECL
82 # define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL
86 # pragma warning(push)
87 # pragma warning(disable : 4251 4231 4660)
90 template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
92 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
93 template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
95 #ifndef BOOST_NO_STD_ALLOCATOR
96 template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
98 #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
99 && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
100 && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\
101 && !defined(BOOST_REGEX_ICU_INSTANCES)
102 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
103 template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
105 #ifndef BOOST_NO_STD_ALLOCATOR
106 template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::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 > >;
112 # pragma warning(pop)
119 #undef BOOST_REGEX_TEMPLATE_DECL
121 #elif (defined(__GNUC__) && (__GNUC__ >= 3))
123 # ifndef BOOST_REGEX_INSTANTIATE
124 # define template __extension__ extern template
127 #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
129 template BOOST_REGEX_DECL
130 std::locale cpp_regex_traits_base<BOOST_REGEX_CHAR_T>::imbue(const std::locale& l);
132 template BOOST_REGEX_DECL
133 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
134 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
135 template BOOST_REGEX_DECL
136 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
137 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
138 template BOOST_REGEX_DECL
139 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
140 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
141 template BOOST_REGEX_DECL
142 void cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::init();
143 template BOOST_REGEX_DECL
144 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::char_class_type
145 cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
146 #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
147 template BOOST_REGEX_DECL
148 bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const;
151 template BOOST_REGEX_DECL
152 int cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
153 template BOOST_REGEX_DECL
154 std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
155 template BOOST_REGEX_DECL
156 std::string& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name_inst();
157 template BOOST_REGEX_DECL
158 std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name();
159 #ifdef BOOST_HAS_THREADS
160 template BOOST_REGEX_DECL
161 static_mutex& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_mutex_inst();
165 template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >&
166 basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::do_assign(
167 const BOOST_REGEX_CHAR_T* p1,
168 const BOOST_REGEX_CHAR_T* p2,
170 template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::locale_type BOOST_REGEX_CALL
171 basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::imbue(locale_type l);
173 template BOOST_REGEX_DECL void BOOST_REGEX_CALL
174 match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign(
175 const match_results<const BOOST_REGEX_CHAR_T*>& m);
178 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(
179 const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f);
180 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();
181 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();
184 #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
185 && !defined(BOOST_REGEX_ICU_INSTANCES)\
186 && !defined(__SGI_STL_PORT)\
187 && !defined(_STLPORT_VERSION)
188 // std:basic_string<>::const_iterator instances as well:
189 template BOOST_REGEX_DECL void BOOST_REGEX_CALL
190 match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign(
191 const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m);
194 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(
195 const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f);
196 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();
197 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();
210 #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES