Question regarding boolalpha and lexical_cast for 1.30.0

Hello, I'm trying to get lexical_cast to convert a std::string to bool; I realize that this is done with normal IOStreams by using boolalpha. Is there a way to do this with lexical_cast? I saw some old posts in the archives and they were apparently with older code bases because I was unable to get their code snippets to work properly [either that or my compiler is messed up :)]. For reference, I use Visual Studio .NET 2002. Thank you very much for any assistance in advance. --Paul

Paul Wendt wrote:
Hello,
I'm trying to get lexical_cast to convert a std::string to bool; I realize that this is done with normal IOStreams by using boolalpha. Is there a way to do this with lexical_cast? I saw some old posts in the archives and they were apparently with older code bases because I was unable to get their code snippets to work properly [either that or my compiler is messed up :)].
For reference, I use Visual Studio .NET 2002.
On Tuesday 06 May 2003 14:47:37 I proposed this (with code) in gmane.comp.lib.boost.devel, see subject "boost::lexical_cast<bool>("true");" Markus
participants (2)
-
Markus Werle
-
Paul Wendt