From 31b68369ae8c324b8a5f61e0ab2b1066b0c657eb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 3 Jun 2008 12:52:55 +0000 Subject: [PATCH] Patch for VC9 explicit template instantiation. Fixes #1959. [SVN r46077] --- include/boost/regex/v4/instances.hpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index b9898cb0..d12dc6b2 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -71,32 +71,39 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher 1310 +# define BOOST_REGEX_TEMPLATE_DECL +# endif # define template extern template # endif # endif +#ifndef BOOST_REGEX_TEMPLATE_DECL +# define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL +#endif + # ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4251 4231 4660) # endif -template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; +template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) -template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; +template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; #endif #ifndef BOOST_NO_STD_ALLOCATOR -template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; +template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; #endif #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\ && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\ && !defined(BOOST_REGEX_ICU_INSTANCES) #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) -template class BOOST_REGEX_DECL match_results< std::basic_string::const_iterator >; +template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string::const_iterator >; #endif #ifndef BOOST_NO_STD_ALLOCATOR -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 >; +template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; #endif #endif @@ -109,6 +116,8 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_str # undef template # endif +#undef BOOST_REGEX_TEMPLATE_DECL + #elif (defined(__GNUC__) && (__GNUC__ >= 3)) # ifndef BOOST_REGEX_INSTANTIATE