Fix for duplicate symbol errors when using VC7.1 without /Zc:wchar_t

[SVN r33706]
This commit is contained in:
John Maddock
2006-04-15 17:21:19 +00:00
parent 4a02d7ecde
commit 9e7e1ba009

View File

@ -24,6 +24,11 @@
#define BOOST_REGEX_US_INSTANTIATE
#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> >&,
@ -40,6 +45,7 @@ template _CRTIMP2 bool __cdecl operator<(
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 std::size_t __cdecl char_traits<unsigned short>::length(unsigned short const*);
}
#endif