vrshoot

view libs/assimp/boost/lexical_cast.hpp @ 3:c179c72369be

rename candy->vr
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 03 Feb 2014 08:52:13 +0200
parents
children
line source
1 /// A quick replacement for boost::lexical_cast for all the Boost haters out there
3 #ifndef __AI_BOOST_WORKAROUND_LEXICAL_CAST
4 #define __AI_BOOST_WORKAROUND_LEXICAL_CAST
6 namespace boost
7 {
9 /// A quick replacement for boost::lexical_cast - should work for all types a stringstream can handle
10 template <typename TargetType, typename SourceType>
11 TargetType lexical_cast( const SourceType& source)
12 {
13 std::stringstream stream;
14 TargetType result;
16 stream << source;
17 stream >> result;
18 return result;
19 }
21 } // namespace boost
23 #endif // __AI_BOOST_WORKAROUND_LEXICAL_CAST