sl@0: /* sl@0: * sl@0: * Copyright (c) 1998-2002 sl@0: * John Maddock sl@0: * sl@0: * Use, modification and distribution are subject to the sl@0: * Boost Software License, Version 1.0. (See accompanying file sl@0: * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: * sl@0: */ sl@0: sl@0: /* sl@0: * LOCATION: see http://www.boost.org for most recent version. sl@0: * FILE instances.cpp sl@0: * VERSION see sl@0: * DESCRIPTION: Defines those template instances that are placed in the sl@0: * library rather than in the users object files. sl@0: */ sl@0: sl@0: // sl@0: // note no include guard, we may include this multiple times: sl@0: // sl@0: #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES sl@0: sl@0: namespace boost{ sl@0: sl@0: // sl@0: // this header can be included multiple times, each time with sl@0: // a different character type, BOOST_REGEX_CHAR_T must be defined sl@0: // first: sl@0: // sl@0: #ifndef BOOST_REGEX_CHAR_T sl@0: # error "BOOST_REGEX_CHAR_T not defined" sl@0: #endif sl@0: sl@0: #ifndef BOOST_REGEX_TRAITS_T sl@0: # define BOOST_REGEX_TRAITS_T , boost::regex_traits sl@0: #endif sl@0: sl@0: // sl@0: // what follows is compiler specific: sl@0: // sl@0: sl@0: #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) sl@0: sl@0: #ifdef BOOST_HAS_ABI_HEADERS sl@0: # include BOOST_ABI_PREFIX sl@0: #endif sl@0: sl@0: # ifndef BOOST_REGEX_INSTANTIATE sl@0: # pragma option push -Jgx sl@0: # endif sl@0: sl@0: template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; sl@0: template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; sl@0: #ifndef BOOST_NO_STD_ALLOCATOR sl@0: template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; sl@0: #endif sl@0: sl@0: # ifndef BOOST_REGEX_INSTANTIATE sl@0: # pragma option pop sl@0: # endif sl@0: sl@0: #ifdef BOOST_HAS_ABI_HEADERS sl@0: # include BOOST_ABI_SUFFIX sl@0: #endif sl@0: sl@0: #elif defined(BOOST_MSVC) || defined(__ICL) sl@0: sl@0: # ifndef BOOST_REGEX_INSTANTIATE sl@0: # ifdef __GNUC__ sl@0: # define template __extension__ extern template sl@0: # else sl@0: # define template extern template sl@0: # endif sl@0: # endif sl@0: sl@0: # ifdef BOOST_MSVC sl@0: # pragma warning(push) sl@0: # pragma warning(disable : 4251 4231 4660) sl@0: # endif sl@0: sl@0: template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; sl@0: sl@0: #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) sl@0: template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; sl@0: #endif sl@0: #ifndef BOOST_NO_STD_ALLOCATOR sl@0: template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; sl@0: #endif sl@0: #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\ sl@0: && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\ sl@0: && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\ sl@0: && !defined(BOOST_REGEX_ICU_INSTANCES) sl@0: #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) sl@0: template class BOOST_REGEX_DECL match_results< std::basic_string::const_iterator >; sl@0: #endif sl@0: #ifndef BOOST_NO_STD_ALLOCATOR sl@0: template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; sl@0: #endif sl@0: #endif sl@0: sl@0: sl@0: # ifdef BOOST_MSVC sl@0: # pragma warning(pop) sl@0: # endif sl@0: sl@0: # ifdef template sl@0: # undef template sl@0: # endif sl@0: sl@0: #elif (defined(__GNUC__) && (__GNUC__ >= 3)) sl@0: sl@0: # ifndef BOOST_REGEX_INSTANTIATE sl@0: # define template __extension__ extern template sl@0: # endif sl@0: sl@0: #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES) sl@0: namespace re_detail{ sl@0: template BOOST_REGEX_DECL sl@0: std::locale cpp_regex_traits_base::imbue(const std::locale& l); sl@0: sl@0: template BOOST_REGEX_DECL sl@0: cpp_regex_traits_implementation::string_type sl@0: cpp_regex_traits_implementation::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; sl@0: template BOOST_REGEX_DECL sl@0: cpp_regex_traits_implementation::string_type sl@0: cpp_regex_traits_implementation::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; sl@0: template BOOST_REGEX_DECL sl@0: cpp_regex_traits_implementation::string_type sl@0: cpp_regex_traits_implementation::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; sl@0: template BOOST_REGEX_DECL sl@0: void cpp_regex_traits_implementation::init(); sl@0: template BOOST_REGEX_DECL sl@0: cpp_regex_traits_implementation::char_class_type sl@0: cpp_regex_traits_implementation::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; sl@0: #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET sl@0: template BOOST_REGEX_DECL sl@0: bool cpp_regex_traits_implementation::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const; sl@0: #endif sl@0: } // namespace sl@0: template BOOST_REGEX_DECL sl@0: int cpp_regex_traits::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const; sl@0: template BOOST_REGEX_DECL sl@0: std::string cpp_regex_traits::catalog_name(const std::string& name); sl@0: template BOOST_REGEX_DECL sl@0: std::string& cpp_regex_traits::get_catalog_name_inst(); sl@0: template BOOST_REGEX_DECL sl@0: std::string cpp_regex_traits::get_catalog_name(); sl@0: #ifdef BOOST_HAS_THREADS sl@0: template BOOST_REGEX_DECL sl@0: static_mutex& cpp_regex_traits::get_mutex_inst(); sl@0: #endif sl@0: #endif sl@0: sl@0: template BOOST_REGEX_DECL basic_regex& sl@0: basic_regex::do_assign( sl@0: const BOOST_REGEX_CHAR_T* p1, sl@0: const BOOST_REGEX_CHAR_T* p2, sl@0: flag_type f); sl@0: template BOOST_REGEX_DECL basic_regex::locale_type BOOST_REGEX_CALL sl@0: basic_regex::imbue(locale_type l); sl@0: sl@0: template BOOST_REGEX_DECL void BOOST_REGEX_CALL sl@0: match_results::maybe_assign( sl@0: const match_results& m); sl@0: sl@0: namespace re_detail{ sl@0: template BOOST_REGEX_DECL void perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::construct_init( sl@0: const basic_regex& e, match_flag_type f); sl@0: template BOOST_REGEX_DECL bool perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::match(); sl@0: template BOOST_REGEX_DECL bool perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::find(); sl@0: } // namespace sl@0: sl@0: #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ sl@0: && !defined(BOOST_REGEX_ICU_INSTANCES)\ sl@0: && !defined(__SGI_STL_PORT)\ sl@0: && !defined(_STLPORT_VERSION) sl@0: // std:basic_string<>::const_iterator instances as well: sl@0: template BOOST_REGEX_DECL void BOOST_REGEX_CALL sl@0: match_results::const_iterator>::maybe_assign( sl@0: const match_results::const_iterator>& m); sl@0: sl@0: namespace re_detail{ sl@0: template BOOST_REGEX_DECL void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( sl@0: const basic_regex& e, match_flag_type f); sl@0: template BOOST_REGEX_DECL bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); sl@0: template BOOST_REGEX_DECL bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); sl@0: } // namespace sl@0: #endif sl@0: sl@0: # ifdef template sl@0: # undef template sl@0: # endif sl@0: sl@0: sl@0: #endif sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES sl@0: sl@0: sl@0: sl@0: sl@0: