Domanda

I'm in a situation where I would like to use boost::lexical_cast, but cannot make use of C/C++ runtime libraries, and thus cannot use lexical_cast. I don't know Boost extremely well, but I have seen the use of blocks such as:

#ifdef BOOST_NO_STRINGSTREAM
#include <strstream> 
#else  
#include <sstream>  
#endif  

and am wondering if there might be a #define to use so that Boost doesn't depend on said libraries.

If there's a specific place in the Boost documentation that explains possible preprocessor options, that would be much appreciated as well, as I can't seem to find it online.

È stato utile?

Soluzione

There is Boost.Config for configuring Boost for special cases.

Boost.Lexical_Cast depends at least on <string>, <istream> and <ostream> from standard library. Possibly more. I don't think you can remove such dependencies by simply reconfiguring something.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top