diff options
Diffstat (limited to 'TCLAP/tclap/ValuesConstraint.h')
-rw-r--r-- | TCLAP/tclap/ValuesConstraint.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/TCLAP/tclap/ValuesConstraint.h b/TCLAP/tclap/ValuesConstraint.h index d1c1df7..9851432 100644 --- a/TCLAP/tclap/ValuesConstraint.h +++ b/TCLAP/tclap/ValuesConstraint.h @@ -1,3 +1,5 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + /****************************************************************************** @@ -5,6 +7,7 @@ * file: ValuesConstraint.h * * Copyright (c) 2005, Michael E. Smoot + * Copyright (c) 2017, Google LLC * All rights reserved. * * See the file COPYING in the top directory of this distribution for @@ -48,7 +51,7 @@ class ValuesConstraint : public Constraint<T> * Constructor. * \param allowed - vector of allowed values. */ - ValuesConstraint(std::vector<T>& allowed); + ValuesConstraint(std::vector<T>const& allowed); /** * Virtual destructor. @@ -87,21 +90,13 @@ class ValuesConstraint : public Constraint<T> }; template<class T> -ValuesConstraint<T>::ValuesConstraint(std::vector<T>& allowed) +ValuesConstraint<T>::ValuesConstraint(std::vector<T> const& allowed) : _allowed(allowed), _typeDesc("") { for ( unsigned int i = 0; i < _allowed.size(); i++ ) { - -#if defined(HAVE_SSTREAM) std::ostringstream os; -#elif defined(HAVE_STRSTREAM) - std::ostrstream os; -#else -#error "Need a stringstream (sstream or strstream) to compile!" -#endif - os << _allowed[i]; std::string temp( os.str() ); |