|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Convert an std::string to an int.
More...
#include <Teuchos_as.hpp>
Static Public Member Functions | |
| static int | safeConvert (const std::string &t) |
Convert the given std::string to an int, with checks. | |
| static int | convert (const std::string &t) |
Convert the given std::string to an int. | |
Static Private Member Functions | |
| static long | safeConvertToLong (const std::string &t) |
Convert the given std::string to an intermediate long, with checks. | |
Convert an std::string to an int.
We assume the string stores a base-10 integer, if it stores an integer at all.
Definition at line 812 of file Teuchos_as.hpp.
| static long Teuchos::ValueTypeConversionTraits< int, std::string >::safeConvertToLong | ( | const std::string & | t | ) | [inline, static, private] |
Convert the given std::string to an intermediate long, with checks.
Definition at line 815 of file Teuchos_as.hpp.
| static int Teuchos::ValueTypeConversionTraits< int, std::string >::safeConvert | ( | const std::string & | t | ) | [inline, static] |
Convert the given std::string to an int, with checks.
If the string overflows int, this throws std::range_error. If it does not contain an integer, this throws std::invalid_argument.
Definition at line 842 of file Teuchos_as.hpp.
| static int Teuchos::ValueTypeConversionTraits< int, std::string >::convert | ( | const std::string & | t | ) | [inline, static] |
Convert the given std::string to an int.
Definition at line 847 of file Teuchos_as.hpp.
1.7.6.1