1 /* 2 * 3 * Copyright (c) 1998-2002 4 * John Maddock 5 * 6 * Use, modification and distribution are subject to the 7 * Boost Software License, Version 1.0. (See accompanying file 8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 * 10 */ 11 12 /* 13 * LOCATION: see http://www.boost.org for most recent version. 14 * FILE: winstances.cpp 15 * VERSION: see <boost/version.hpp> 16 * DESCRIPTION: regex unsigned short template instances (MSVC only). 17 */ 18 19 #define BOOST_REGEX_SOURCE 20 #ifdef _MSC_VER 21 #pragma warning(disable:4506) // 'no definition for inline function' 22 #endif 23 24 #include <boost/detail/workaround.hpp> 25 #include <memory> 26 #include <string> 27 28 #if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \ 29 && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\ 30 && BOOST_WORKAROUND(BOOST_MSVC, <1600) 31 // 32 // This is a horrible workaround, but without declaring these symbols extern we get 33 // duplicate symbol errors when linking if the application is built without 34 // /Zc:wchar_t 35 // 36 #ifdef _CRTIMP2_PURE 37 # define BOOST_REGEX_STDLIB_DECL _CRTIMP2_PURE 38 #else 39 # define BOOST_REGEX_STDLIB_DECL _CRTIMP2 40 #endif 41 42 namespace std{ 43 44 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) 45 template class BOOST_REGEX_STDLIB_DECL allocator<unsigned short>; 46 template class BOOST_REGEX_STDLIB_DECL _String_val<unsigned short, allocator<unsigned short> >; 47 template class BOOST_REGEX_STDLIB_DECL basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >; 48 #endif 49 50 #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) 51 template<> BOOST_REGEX_STDLIB_DECL std::size_t __cdecl char_traits<unsigned short>::length(unsigned short const*); 52 #endif 53 54 template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( 55 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, 56 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); 57 template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( 58 const unsigned short *, 59 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); 60 template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( 61 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, 62 const unsigned short *); 63 template BOOST_REGEX_STDLIB_DECL bool __cdecl operator<( 64 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, 65 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); 66 template BOOST_REGEX_STDLIB_DECL bool __cdecl operator>( 67 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&, 68 const basic_string<unsigned short, char_traits<unsigned short>, allocator<unsigned short> >&); 69 } 70 #endif 71 72 #include <boost/regex/config.hpp> 73 74 #if !defined(BOOST_NO_WREGEX) && defined(BOOST_REGEX_HAS_OTHER_WCHAR_T) && !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES) 75 #define BOOST_REGEX_US_INSTANTIATE 76 77 #include <boost/regex.hpp> 78 79 #endif 80 81 82