mirror of
https://github.com/boostorg/regex.git
synced 2025-07-15 21:32:18 +02:00
Fixes for issue #1871 that prevents duplicate symbol errors with VC++ compilers, when building with /Zc:wchar_t-.
[SVN r44842]
This commit is contained in:
@ -49,6 +49,9 @@ template _CRTIMP2 bool __cdecl operator>(
|
|||||||
#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))
|
#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*);
|
template<> _CRTIMP2 std::size_t __cdecl char_traits<unsigned short>::length(unsigned short const*);
|
||||||
#endif
|
#endif
|
||||||
|
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||||
|
template _CRTIMP2 allocator<unsigned short>::allocator();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,9 +19,40 @@
|
|||||||
|
|
||||||
#define BOOST_REGEX_SOURCE
|
#define BOOST_REGEX_SOURCE
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/regex/config.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
|
#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<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==(
|
||||||
|
const unsigned short *,
|
||||||
|
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&);
|
||||||
|
template _CRTIMP2 bool __cdecl operator==(
|
||||||
|
const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&,
|
||||||
|
const unsigned short *);
|
||||||
|
template _CRTIMP2 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> >&);
|
||||||
|
template _CRTIMP2 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> >&);
|
||||||
|
#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
|
||||||
|
|
||||||
#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>
|
||||||
|
Reference in New Issue
Block a user