azraelly / ticpp

Automatically exported from code.google.com/p/ticpp
0 stars 0 forks source link

std::wstring #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Change the std::string to std::wstring in the beginner tutorial

Please provide any additional information below.
I get an error at :

template < class T >
            void FromString( const std::string& temp, T* out ) const
        {
            std::istringstream val( temp );
            val >> *out;

            if ( val.fail() )
            {
                TICPPTHROW( "Could not convert \"" << temp << "\" to target type" );
            }
        }

When T is a wstring this doesnt compile because std::istringstream doesnt work 
for wstrings.

Original issue reported on code.google.com by barisusa...@gmail.com on 26 Sep 2009 at 2:25