Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
Teuchos::ValueTypeConversionTraits< long long, std::string > Class Template Reference

Convert an std::string to a long long. More...

#include <Teuchos_as.hpp>

Static Public Member Functions

static long long safeConvert (const std::string &t)
 Convert the given std::string to a long long, with checks. More...
 
static long long convert (const std::string &t)
 Convert the given std::string to a long long. More...
 

Detailed Description

template<>
class Teuchos::ValueTypeConversionTraits< long long, std::string >

Convert an std::string to a long long.

We assume the string stores a base-10 integer, if it stores an integer at all.

Definition at line 692 of file Teuchos_as.hpp.

Member Function Documentation

static long long Teuchos::ValueTypeConversionTraits< long long, std::string >::safeConvert ( const std::string &  t)
inlinestatic

Convert the given std::string to a long long, with checks.

If the string overflows long long, this throws std::range_error. If it does not contain an integer, this throws std::invalid_argument.

Definition at line 699 of file Teuchos_as.hpp.

static long long Teuchos::ValueTypeConversionTraits< long long, std::string >::convert ( const std::string &  t)
inlinestatic

Convert the given std::string to a long long.

Definition at line 713 of file Teuchos_as.hpp.


The documentation for this class was generated from the following file: