From 535e1b05cc180804adb43616449319ce676258f1 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 19 May 2003 11:55:23 +0000 Subject: [PATCH] Updated library names, minor fixes for gcc2.95 [SVN r18442] --- .../regex/config/regex_library_include.hpp | 18 ++++++------ include/boost/regex/v4/instances.hpp | 29 ------------------- .../boost/regex/v4/regex_token_iterator.hpp | 6 ++-- 3 files changed, 12 insertions(+), 41 deletions(-) diff --git a/include/boost/regex/config/regex_library_include.hpp b/include/boost/regex/config/regex_library_include.hpp index 80a0043f..90f65c90 100644 --- a/include/boost/regex/config/regex_library_include.hpp +++ b/include/boost/regex/config/regex_library_include.hpp @@ -28,17 +28,19 @@ Libraries for Borland and Microsoft compilers are automatically selected here, the name of the lib is selected according to the following formula: -BOOST_LIB_NAME +BOOST_LIB_PREFIX + + BOOST_LIB_NAME + "_" + BOOST_LIB_TOOLSET + "_" + BOOST_LIB_THREAD_OPT + BOOST_LIB_RT_OPT - + BOOST_LIB_LINK_OPT + BOOST_LIB_DEBUG_OPT These are defined as: +BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". + BOOST_LIB_NAME: The base name of the lib (boost_regex). BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). @@ -49,9 +51,6 @@ BOOST_LIB_THREAD_OPT: "s" for single thread builds, BOOST_LIB_RT_OPT: "s" for static runtime, "d" for dynamic runtime. -BOOST_LIB_LINK_OPT: "s" for static link, - "i" for dynamic link. - BOOST_LIB_DEBUG_OPT: nothing for release builds, "d" for debug builds, "dd" for debug-diagnostic builds (_STLP_DEBUG). @@ -138,9 +137,9 @@ BOOST_LIB_DEBUG_OPT: nothing for release builds, # undef BOOST_REGEX_STATIC_LINK #endif #if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK) -# define BOOST_LIB_LINK_OPT "i" +# define BOOST_LIB_PREFIX #else -# define BOOST_LIB_LINK_OPT "s" +# define BOOST_LIB_PREFIX "lib" #endif // @@ -160,13 +159,14 @@ BOOST_LIB_DEBUG_OPT: nothing for release builds, // now include the lib: // #if defined(BOOST_LIB_NAME) \ + && defined(BOOST_LIB_PREFIX) \ && defined(BOOST_LIB_TOOLSET) \ && defined(BOOST_LIB_THREAD_OPT) \ && defined(BOOST_LIB_RT_OPT) \ - && defined(BOOST_LIB_LINK_OPT) \ && defined(BOOST_LIB_DEBUG_OPT) -# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_DEBUG_OPT ".lib") +//# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_DEBUG_OPT ".lib") #endif diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index 1ec9498a..8f07c252 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -90,36 +90,7 @@ template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >; # define template template<> # endif -template reg_expression::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&); -template reg_expression::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a); -template reg_expression::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&); -template reg_expression::reg_expression(const reg_expression&); -template reg_expression::~reg_expression(); -template reg_expression& BOOST_REGEX_CALL reg_expression::operator=(const reg_expression&); -template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression::get_allocator()const; -template bool BOOST_REGEX_CALL reg_expression::operator==(const reg_expression&)const; -template bool BOOST_REGEX_CALL reg_expression::operator<(const reg_expression&)const; -template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression::allocator()const; template unsigned int BOOST_REGEX_CALL reg_expression::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression::flag_type f); -template void BOOST_REGEX_CALL reg_expression::compile_maps(); -template void BOOST_REGEX_CALL reg_expression::compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const; -template bool BOOST_REGEX_CALL reg_expression::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const; -template bool BOOST_REGEX_CALL reg_expression::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const; -template void BOOST_REGEX_CALL reg_expression::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces); -template void BOOST_REGEX_CALL reg_expression::move_offsets(re_detail::re_syntax_base* j, unsigned size); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::compile_set_aux(re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack& classes, re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_narrow_type&); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::compile_set_aux(re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack& classes, re_detail::jstack::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_wide_type&); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot); -template unsigned int BOOST_REGEX_CALL reg_expression::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size); -template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c); -template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last); -template void BOOST_REGEX_CALL reg_expression::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max); -template bool BOOST_REGEX_CALL reg_expression::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last); -template unsigned int BOOST_REGEX_CALL reg_expression::probe_restart(re_detail::re_syntax_base* dat); -template unsigned int BOOST_REGEX_CALL reg_expression::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end); -template void BOOST_REGEX_CALL reg_expression::fail(unsigned int err); # ifdef template # undef template diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index 6552143b..0e795834 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -51,11 +51,11 @@ public: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) : end(last), pre(p), subs(v), flags(f){} #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template - regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[N], match_flag_type f) + template + regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f) : end(last), pre(p), flags(f) { - for(std::size_t i = 0; i < N; ++i) + for(std::size_t i = 0; i < CN; ++i) subs.push_back(submatches[i]); } #endif