Jeff Thompson | 86b6d64 | 2013-10-17 15:01:56 -0700 | [diff] [blame] | 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 <ndnboost/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 NDNBOOST_REGEX_NO_EXTERNAL_TEMPLATES |
| 24 | |
| 25 | namespace ndnboost{ |
| 26 | |
| 27 | // |
| 28 | // this header can be included multiple times, each time with |
| 29 | // a different character type, NDNBOOST_REGEX_CHAR_T must be defined |
| 30 | // first: |
| 31 | // |
| 32 | #ifndef NDNBOOST_REGEX_CHAR_T |
| 33 | # error "NDNBOOST_REGEX_CHAR_T not defined" |
| 34 | #endif |
| 35 | |
| 36 | #ifndef NDNBOOST_REGEX_TRAITS_T |
| 37 | # define NDNBOOST_REGEX_TRAITS_T , ndnboost::regex_traits<NDNBOOST_REGEX_CHAR_T > |
| 38 | #endif |
| 39 | |
| 40 | // |
| 41 | // what follows is compiler specific: |
| 42 | // |
| 43 | |
| 44 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) |
| 45 | |
| 46 | #ifdef NDNBOOST_HAS_ABI_HEADERS |
| 47 | # include NDNBOOST_ABI_PREFIX |
| 48 | #endif |
| 49 | |
| 50 | # ifndef NDNBOOST_REGEX_INSTANTIATE |
| 51 | # pragma option push -Jgx |
| 52 | # endif |
| 53 | |
| 54 | template class NDNBOOST_REGEX_DECL basic_regex< NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >; |
| 55 | template class NDNBOOST_REGEX_DECL match_results< const NDNBOOST_REGEX_CHAR_T* >; |
| 56 | #ifndef NDNBOOST_NO_STD_ALLOCATOR |
| 57 | template class NDNBOOST_REGEX_DECL ::ndnboost::re_detail::perl_matcher<NDNBOOST_REGEX_CHAR_T const *, match_results< const NDNBOOST_REGEX_CHAR_T* >::allocator_type NDNBOOST_REGEX_TRAITS_T >; |
| 58 | #endif |
| 59 | |
| 60 | # ifndef NDNBOOST_REGEX_INSTANTIATE |
| 61 | # pragma option pop |
| 62 | # endif |
| 63 | |
| 64 | #ifdef NDNBOOST_HAS_ABI_HEADERS |
| 65 | # include NDNBOOST_ABI_SUFFIX |
| 66 | #endif |
| 67 | |
| 68 | #elif defined(NDNBOOST_MSVC) || defined(__ICL) |
| 69 | |
| 70 | # ifndef NDNBOOST_REGEX_INSTANTIATE |
| 71 | # ifdef __GNUC__ |
| 72 | # define template __extension__ extern template |
| 73 | # else |
| 74 | # if NDNBOOST_MSVC > 1310 |
| 75 | # define NDNBOOST_REGEX_TEMPLATE_DECL |
| 76 | # endif |
| 77 | # define template extern template |
| 78 | # endif |
| 79 | # endif |
| 80 | |
| 81 | #ifndef NDNBOOST_REGEX_TEMPLATE_DECL |
| 82 | # define NDNBOOST_REGEX_TEMPLATE_DECL NDNBOOST_REGEX_DECL |
| 83 | #endif |
| 84 | |
| 85 | # ifdef NDNBOOST_MSVC |
| 86 | # pragma warning(push) |
| 87 | # pragma warning(disable : 4251 4231) |
| 88 | # if NDNBOOST_MSVC < 1600 |
| 89 | # pragma warning(disable : 4660) |
| 90 | # endif |
| 91 | # endif |
| 92 | |
| 93 | template class NDNBOOST_REGEX_TEMPLATE_DECL basic_regex< NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >; |
| 94 | |
| 95 | #if !NDNBOOST_WORKAROUND(NDNBOOST_MSVC, < 1300) |
| 96 | template class NDNBOOST_REGEX_TEMPLATE_DECL match_results< const NDNBOOST_REGEX_CHAR_T* >; |
| 97 | #endif |
| 98 | #ifndef NDNBOOST_NO_STD_ALLOCATOR |
| 99 | template class NDNBOOST_REGEX_TEMPLATE_DECL ::ndnboost::re_detail::perl_matcher<NDNBOOST_REGEX_CHAR_T const *, match_results< const NDNBOOST_REGEX_CHAR_T* >::allocator_type NDNBOOST_REGEX_TRAITS_T >; |
| 100 | #endif |
| 101 | #if !(defined(NDNBOOST_DINKUMWARE_STDLIB) && (NDNBOOST_DINKUMWARE_STDLIB <= 1))\ |
| 102 | && !(defined(NDNBOOST_INTEL_CXX_VERSION) && (NDNBOOST_INTEL_CXX_VERSION <= 800))\ |
| 103 | && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\ |
| 104 | && !defined(NDNBOOST_REGEX_ICU_INSTANCES) |
| 105 | #if !NDNBOOST_WORKAROUND(NDNBOOST_MSVC, < 1300) |
| 106 | template class NDNBOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator >; |
| 107 | #endif |
| 108 | #ifndef NDNBOOST_NO_STD_ALLOCATOR |
| 109 | template class NDNBOOST_REGEX_TEMPLATE_DECL ::ndnboost::re_detail::perl_matcher< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, ndnboost::regex_traits<NDNBOOST_REGEX_CHAR_T > >; |
| 110 | #endif |
| 111 | #endif |
| 112 | |
| 113 | |
| 114 | # ifdef NDNBOOST_MSVC |
| 115 | # pragma warning(pop) |
| 116 | # endif |
| 117 | |
| 118 | # ifdef template |
| 119 | # undef template |
| 120 | # endif |
| 121 | |
| 122 | #undef NDNBOOST_REGEX_TEMPLATE_DECL |
| 123 | |
| 124 | #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(NDNBOOST_NO_CXX11_EXTERN_TEMPLATE) |
| 125 | |
| 126 | # ifndef NDNBOOST_REGEX_INSTANTIATE |
| 127 | # ifdef __GNUC__ |
| 128 | # define template __extension__ extern template |
| 129 | # else |
| 130 | # define template extern template |
| 131 | # endif |
| 132 | # endif |
| 133 | |
| 134 | #if !defined(NDNBOOST_NO_STD_LOCALE) && !defined(NDNBOOST_REGEX_ICU_INSTANCES) |
| 135 | namespace re_detail{ |
| 136 | template NDNBOOST_REGEX_DECL |
| 137 | std::locale cpp_regex_traits_base<NDNBOOST_REGEX_CHAR_T>::imbue(const std::locale& l); |
| 138 | |
| 139 | template NDNBOOST_REGEX_DECL |
| 140 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::string_type |
| 141 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::transform_primary(const NDNBOOST_REGEX_CHAR_T* p1, const NDNBOOST_REGEX_CHAR_T* p2) const; |
| 142 | template NDNBOOST_REGEX_DECL |
| 143 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::string_type |
| 144 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::transform(const NDNBOOST_REGEX_CHAR_T* p1, const NDNBOOST_REGEX_CHAR_T* p2) const; |
| 145 | template NDNBOOST_REGEX_DECL |
| 146 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::string_type |
| 147 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::lookup_collatename(const NDNBOOST_REGEX_CHAR_T* p1, const NDNBOOST_REGEX_CHAR_T* p2) const; |
| 148 | template NDNBOOST_REGEX_DECL |
| 149 | void cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::init(); |
| 150 | template NDNBOOST_REGEX_DECL |
| 151 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::char_class_type |
| 152 | cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::lookup_classname_imp(const NDNBOOST_REGEX_CHAR_T* p1, const NDNBOOST_REGEX_CHAR_T* p2) const; |
| 153 | #ifdef NDNBOOST_REGEX_BUGGY_CTYPE_FACET |
| 154 | template NDNBOOST_REGEX_DECL |
| 155 | bool cpp_regex_traits_implementation<NDNBOOST_REGEX_CHAR_T>::isctype(const NDNBOOST_REGEX_CHAR_T c, char_class_type mask) const; |
| 156 | #endif |
| 157 | } // namespace |
| 158 | template NDNBOOST_REGEX_DECL |
| 159 | int cpp_regex_traits<NDNBOOST_REGEX_CHAR_T>::toi(const NDNBOOST_REGEX_CHAR_T*& first, const NDNBOOST_REGEX_CHAR_T* last, int radix)const; |
| 160 | template NDNBOOST_REGEX_DECL |
| 161 | std::string cpp_regex_traits<NDNBOOST_REGEX_CHAR_T>::catalog_name(const std::string& name); |
| 162 | template NDNBOOST_REGEX_DECL |
| 163 | std::string& cpp_regex_traits<NDNBOOST_REGEX_CHAR_T>::get_catalog_name_inst(); |
| 164 | template NDNBOOST_REGEX_DECL |
| 165 | std::string cpp_regex_traits<NDNBOOST_REGEX_CHAR_T>::get_catalog_name(); |
| 166 | #ifdef NDNBOOST_HAS_THREADS |
| 167 | template NDNBOOST_REGEX_DECL |
| 168 | static_mutex& cpp_regex_traits<NDNBOOST_REGEX_CHAR_T>::get_mutex_inst(); |
| 169 | #endif |
| 170 | #endif |
| 171 | |
| 172 | template NDNBOOST_REGEX_DECL basic_regex<NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >& |
| 173 | basic_regex<NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >::do_assign( |
| 174 | const NDNBOOST_REGEX_CHAR_T* p1, |
| 175 | const NDNBOOST_REGEX_CHAR_T* p2, |
| 176 | flag_type f); |
| 177 | template NDNBOOST_REGEX_DECL basic_regex<NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >::locale_type NDNBOOST_REGEX_CALL |
| 178 | basic_regex<NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >::imbue(locale_type l); |
| 179 | |
| 180 | template NDNBOOST_REGEX_DECL void NDNBOOST_REGEX_CALL |
| 181 | match_results<const NDNBOOST_REGEX_CHAR_T*>::maybe_assign( |
| 182 | const match_results<const NDNBOOST_REGEX_CHAR_T*>& m); |
| 183 | |
| 184 | namespace re_detail{ |
| 185 | template NDNBOOST_REGEX_DECL void perl_matcher<NDNBOOST_REGEX_CHAR_T const *, match_results< const NDNBOOST_REGEX_CHAR_T* >::allocator_type NDNBOOST_REGEX_TRAITS_T >::construct_init( |
| 186 | const basic_regex<NDNBOOST_REGEX_CHAR_T NDNBOOST_REGEX_TRAITS_T >& e, match_flag_type f); |
| 187 | template NDNBOOST_REGEX_DECL bool perl_matcher<NDNBOOST_REGEX_CHAR_T const *, match_results< const NDNBOOST_REGEX_CHAR_T* >::allocator_type NDNBOOST_REGEX_TRAITS_T >::match(); |
| 188 | template NDNBOOST_REGEX_DECL bool perl_matcher<NDNBOOST_REGEX_CHAR_T const *, match_results< const NDNBOOST_REGEX_CHAR_T* >::allocator_type NDNBOOST_REGEX_TRAITS_T >::find(); |
| 189 | } // namespace |
| 190 | |
| 191 | #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ |
| 192 | && !defined(NDNBOOST_REGEX_ICU_INSTANCES)\ |
| 193 | && !defined(__SGI_STL_PORT)\ |
| 194 | && !defined(_STLPORT_VERSION) |
| 195 | // std:basic_string<>::const_iterator instances as well: |
| 196 | template NDNBOOST_REGEX_DECL void NDNBOOST_REGEX_CALL |
| 197 | match_results<std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign( |
| 198 | const match_results<std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator>& m); |
| 199 | |
| 200 | namespace re_detail{ |
| 201 | template NDNBOOST_REGEX_DECL void perl_matcher<std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, ndnboost::regex_traits<NDNBOOST_REGEX_CHAR_T > >::construct_init( |
| 202 | const basic_regex<NDNBOOST_REGEX_CHAR_T>& e, match_flag_type f); |
| 203 | template NDNBOOST_REGEX_DECL bool perl_matcher<std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, ndnboost::regex_traits<NDNBOOST_REGEX_CHAR_T > >::match(); |
| 204 | template NDNBOOST_REGEX_DECL bool perl_matcher<std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<NDNBOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, ndnboost::regex_traits<NDNBOOST_REGEX_CHAR_T > >::find(); |
| 205 | } // namespace |
| 206 | #endif |
| 207 | |
| 208 | # ifdef template |
| 209 | # undef template |
| 210 | # endif |
| 211 | |
| 212 | |
| 213 | #endif |
| 214 | |
| 215 | } // namespace ndnboost |
| 216 | |
| 217 | #endif // NDNBOOST_REGEX_NO_EXTERNAL_TEMPLATES |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |