Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Teuchos::ValueTypeConversionTraits< long, unsigned int > Class 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.
 
static long safeConvert (const unsigned int t)
 Convert from unsigned int to long, checking for overflow first.
 

Detailed Description

Convert from unsigned int to long.

Definition at line 2048 of file Teuchos_as.hpp.

Member Function Documentation

◆ convert()

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.

◆ safeConvert()

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: