Compiling exception/get_error_info.hpp in Visual Stuido UNICODE project
Hi,
I'm trying to compile my project in MS Visual Studio 2008 with UNICODE and _UNICODE symbols defined. This automatically makes std::string resolve to std::wstring. I'm having a problem compiling exception/get_error_info.hpp because of the following code
struct
strwrap
{
std::string str;
char const * ptr;
explicit
strwrap( char const * s ):
str(s),
ptr(&str[0])
{
}
Error messages quite predictably say about type inconsistency, there's a copy of them below my signature.
Is there a known way to tweak boost to build seamlessly with Visual Studio Unicode projects?
WBR Oleg V. Zhylin ovz@yahoo.com
g:\Program Files\boost\boost_1_38\boost\exception\get_error_info.hpp(30) : error C2664: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string(const std::basic_string<_Elem,_Traits,_Ax>::_Alloc &)' : cannot convert parameter 1 from 'const char *' to 'const std::basic_string<_Elem,_Traits,_Ax>::_Alloc &'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
I'm trying to compile my project in MS Visual Studio 2008 with UNICODE and _UNICODE symbols defined. This automatically makes std::string resolve to std::wstring.
Neither UNICODE nor _UNICODE make std::string to be std::wstring.
These are defined as follows:
typedef basic_string
wstring;
Probably you've got some #define in your own code.
participants (2)
-
Igor R
-
Oleg V. Zhylin