Teuchos_getConst.hpp File Reference

#include "Teuchos_ConfigDefs.hpp"

Include dependency graph for Teuchos_getConst.hpp:

Go to the source code of this file.

Namespaces

namespace  Teuchos

Functions

template<class T>
const T & getConst (T &t)
 Return a constant reference to an object given a non-const reference.


Function Documentation

template<class T>
const T& getConst T &  t  )  [inline]
 

Return a constant reference to an object given a non-const reference.

This function just provides a shorthand notation for

 const_cast<const T&>(t) 
as
 getCost(t) 
so that one does not have to type in the name of the class which can be quite long in some cases.

Definition at line 47 of file Teuchos_getConst.hpp.


Generated on Thu Sep 18 12:41:18 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1