diff --git a/src/usinstances.cpp b/src/usinstances.cpp index 337d815f..d9f600dc 100644 --- a/src/usinstances.cpp +++ b/src/usinstances.cpp @@ -49,6 +49,9 @@ template _CRTIMP2 bool __cdecl operator>( #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) template<> _CRTIMP2 std::size_t __cdecl char_traits::length(unsigned short const*); #endif +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +template _CRTIMP2 allocator::allocator(); +#endif } #endif diff --git a/src/wc_regex_traits.cpp b/src/wc_regex_traits.cpp index 9daf0804..29a77e15 100644 --- a/src/wc_regex_traits.cpp +++ b/src/wc_regex_traits.cpp @@ -19,9 +19,40 @@ #define BOOST_REGEX_SOURCE -#include +#include #include +#ifdef _DLL_CPPLIB +// +// This is a horrible workaround, without declaring these symbols extern we get +// duplicate symbol errors when linking if the application is built without +// /Zc:wchar_t +// +namespace std{ +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const unsigned short *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const unsigned short *); +template _CRTIMP2 bool __cdecl operator<( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>( + const basic_string, allocator >&, + const basic_string, allocator >&); +#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) +template<> _CRTIMP2 std::size_t __cdecl char_traits::length(unsigned short const*); +#endif +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +template _CRTIMP2 allocator::allocator(); +#endif +} +#endif + #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560) #include