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