mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-08-04 10:16:41 -04:00
yet another fix for HAVE_SSTREAM stuff
This commit is contained in:
parent
c40782023a
commit
cb1517921f
@ -38,6 +38,8 @@
|
||||
#include <sstream>
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
#include <strstream>
|
||||
#else
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
namespace TCLAP {
|
||||
@ -85,16 +87,12 @@ class ValueExtractor
|
||||
{
|
||||
T temp;
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#if defined(HAVE_SSTREAM)
|
||||
std::istringstream is(val);
|
||||
#elif HAVE_STRSTREAM
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
std::istrstream is(val.c_str());
|
||||
#else
|
||||
throw(SpecificationException(
|
||||
string("Missing sstream or strstream lib, ") +
|
||||
"without which, nothing will work. " +
|
||||
"Not even sure how you got this far!",
|
||||
toString()));
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
int valuesRead = 0;
|
||||
@ -350,16 +348,12 @@ void MultiArg<T>::allowedInit()
|
||||
for ( unsigned int i = 0; i < _allowed.size(); i++ )
|
||||
{
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#if defined(HAVE_SSTREAM)
|
||||
std::ostringstream os;
|
||||
#elif HAVE_STRSTREAM
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
std::ostrstream os;
|
||||
#else
|
||||
throw(SpecificationException(
|
||||
string("Missing sstream or strstream lib, ") +
|
||||
"without which, nothing will work. " +
|
||||
"Not even sure how you got this far!",
|
||||
toString()));
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
os << _allowed[i];
|
||||
|
@ -38,6 +38,8 @@
|
||||
#include <sstream>
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
#include <strstream>
|
||||
#else
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
namespace TCLAP {
|
||||
@ -86,16 +88,12 @@ template<class T> class ValueExtractor
|
||||
int extractValue( const std::string& val )
|
||||
{
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#if defined(HAVE_SSTREAM)
|
||||
std::istringstream is(val);
|
||||
#elif HAVE_STRSTREAM
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
std::istrstream is(val.c_str());
|
||||
#else
|
||||
throw(SpecificationException(
|
||||
string("Missing sstream or strstream lib, ") +
|
||||
"without which, nothing will work. " +
|
||||
"Not even sure how you got this far!",
|
||||
toString()));
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
int valuesRead = 0;
|
||||
@ -381,16 +379,12 @@ void ValueArg<T>::allowedInit()
|
||||
for ( unsigned int i = 0; i < _allowed.size(); i++ )
|
||||
{
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#if defined(HAVE_SSTREAM)
|
||||
std::ostringstream os;
|
||||
#elif defined(HAVE_STRSTREAM)
|
||||
std::ostrstream os;
|
||||
#else
|
||||
throw(SpecificationException(
|
||||
string("Missing sstream or strstream lib, ") +
|
||||
"without which, nothing will work. " +
|
||||
"Not even sure how you got this far!",
|
||||
toString()));
|
||||
#error "Need a stringstream (sstream or strstream) to compile!"
|
||||
#endif
|
||||
|
||||
os << _allowed[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user