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