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