Tentative fix for some VC failures.

[SVN r47542]
This commit is contained in:
John Maddock
2008-07-18 11:29:50 +00:00
parent 6eb35e2cf1
commit be28ad44c7

View File

@ -19,42 +19,56 @@
#define BOOST_REGEX_SOURCE #define BOOST_REGEX_SOURCE
#include <boost/regex/config.hpp>
#include <boost/detail/workaround.hpp> #include <boost/detail/workaround.hpp>
#ifdef _DLL_CPPLIB
#include <memory> #include <memory>
#include <string> #include <string>
#if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE)
// //
// This is a horrible workaround, without declaring these symbols extern we get // This is a horrible workaround, but without declaring these symbols extern we get
// duplicate symbol errors when linking if the application is built without // duplicate symbol errors when linking if the application is built without
// /Zc:wchar_t // /Zc:wchar_t
// //
#ifdef _CRTIMP2_PURE
# define BOOST_REGEX_STDLIB_DECL _CRTIMP2_PURE
#else
# define BOOST_REGEX_STDLIB_DECL _CRTIMP2
#endif
namespace std{ namespace std{
template _CRTIMP2 bool __cdecl operator==(
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
template BOOST_REGEX_STDLIB_DECL allocator<unsigned short>::allocator();
template class BOOST_REGEX_STDLIB_DECL _String_val<unsigned short, allocator<unsigned short> >;
template class BOOST_REGEX_STDLIB_DECL basic_string<unsigned short, char_traits<unsigned short>,
allocator<unsigned short> >;
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))
template<> BOOST_REGEX_STDLIB_DECL std::size_t __cdecl char_traits<unsigned short>::length(unsigned short const*);
#endif
template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==(
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&,
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&);
template _CRTIMP2 bool __cdecl operator==( template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==(
const unsigned short *, const unsigned short *,
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&);
template _CRTIMP2 bool __cdecl operator==( template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==(
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&,
const unsigned short *); const unsigned short *);
template _CRTIMP2 bool __cdecl operator<( template BOOST_REGEX_STDLIB_DECL bool __cdecl operator<(
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&,
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&);
template _CRTIMP2 bool __cdecl operator>( template BOOST_REGEX_STDLIB_DECL bool __cdecl operator>(
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&,
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&);
#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))
template<> _CRTIMP2 std::size_t __cdecl char_traits<unsigned short>::length(unsigned short const*);
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
template _CRTIMP2 allocator<unsigned short>::allocator();
#endif
} }
#endif #endif
#include <boost/regex/config.hpp>
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560) #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#include <boost/regex/v4/c_regex_traits.hpp> #include <boost/regex/v4/c_regex_traits.hpp>