Possible Duplicate:
How do I use boost::lexical_cast and std::boolalpha? i.e. boost::lexical_cast< bool >(“true”)
I am trying to cast from string to bool with the method lexical_cast as I show below:
boost::lexical_cast<bool>("false");
The problems is that it throws the exception
boost::bad_lexical_cast
I have read the documentation and I understand that boost::lexical_cast<bool>("false")
is correct.