Teuchos Package Browser (Single Doxygen Collection)  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, unsigned int > Class Template Reference

Convert from unsigned int to long. More...

#include <Teuchos_as.hpp>

Static Public Member Functions

static long convert (const unsigned int t)
 Convert the given unsigned int to a long. More...
 
static long safeConvert (const unsigned int t)
 Convert from unsigned int to long, checking for overflow first. More...
 

Detailed Description

template<>
class Teuchos::ValueTypeConversionTraits< long, unsigned int >

Convert from unsigned int to long.

Definition at line 2048 of file Teuchos_as.hpp.

Member Function Documentation

static long Teuchos::ValueTypeConversionTraits< long, unsigned int >::convert ( const unsigned int  t)
inlinestatic

Convert the given unsigned int to a long.

Warning
On some platforms (e.g., Windows, or any other platform that implements the LLP64 model), unsigned int integer values may overflow long. You should use safeConvert() if you aren't sure that the given unsigned int value fits in a long.

Definition at line 2057 of file Teuchos_as.hpp.

static long Teuchos::ValueTypeConversionTraits< long, unsigned int >::safeConvert ( const unsigned int  t)
inlinestatic

Convert from unsigned int to long, checking for overflow first.

Definition at line 2064 of file Teuchos_as.hpp.


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