Modify

Opened 16 years ago

Closed 12 years ago

#72 closed Bugs (Fixed)

a bug when use std::wstring

Reported by: nobody Owned by: kevlin
Milestone: Component: lexical_cast
Version: None Severity:
Keywords: Cc:

Description

VC6

long i = 0; 
boost::lexical_cast<std::wstring>(i);

error C2679: binary '>>' : no operator defined which 
takes a right-hand operand of type 'class 
std::basic_string<unsigned short,struct 
std::char_traits<unsigned short>,class std::all
ocator<unsigned short> >' (or there is no acceptable 
conversion)

i modify lexical_cast.hpp

/*# ifdef BOOST_LEXICAL_CAST_USE_STRSTREAM
        std::strstream interpreter; // for out-of-the-
box g++ 2.95.2
# else
        std::stringstream interpreter;
# endif*/
# ifdef BOOST_LEXICAL_CAST_USE_STRSTREAM
		#ifdef UNICODE
			std::wstrstream 
interpreter; // for out-of-the-box g++ 2.95.2
		#else
			std::strstream interpreter;
		#endif
# else
		#ifdef UNICODE
			std::wstringstream 
interpreter;
		#else
			std::stringstream 
interpreter;
		#endif
# endif


Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by John Maddock

Status: assignedclosed
Logged In: YES 
user_id=14804

Now fixed in cvs.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain kevlin.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.