Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Teuchos::asFunc< TypeTo > Class Template Reference

Function object wrapper for as(). More...

#include <Teuchos_as.hpp>

List of all members.

Public Member Functions

 asFunc ()
template<class TypeFrom >
TypeTo operator() (const TypeFrom &t)

Detailed Description

template<class TypeTo>
class Teuchos::asFunc< TypeTo >

Function object wrapper for as().

Template Parameters:
TypeToType to which to convert; the output type.

Sometimes it is useful to pass around the as() type conversion function as a first-class object, for example as a function argument of generic algorithms such as std::transform(). In this case, you may use this class, which invokes as() in its operator() method.

Definition at line 289 of file Teuchos_as.hpp.


Constructor & Destructor Documentation

template<class TypeTo >
Teuchos::asFunc< TypeTo >::asFunc ( ) [inline]

Definition at line 291 of file Teuchos_as.hpp.


Member Function Documentation

template<class TypeTo >
template<class TypeFrom >
TypeTo Teuchos::asFunc< TypeTo >::operator() ( const TypeFrom &  t) [inline]

Definition at line 294 of file Teuchos_as.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines