Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_implicit_cast.hpp
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TEUCHOS_IMPLICIT_CAST_HPP
11#define TEUCHOS_IMPLICIT_CAST_HPP
12
14
15namespace Teuchos {
16
48template<class TypeTo, class TypeFrom>
49inline TypeTo implicit_cast( const TypeFrom& t ) { return t; }
50
83template<class TypeTo, class TypeFrom>
84inline TypeTo& implicit_ref_cast( TypeFrom& t ) { return t; }
85
117template<class TypeTo, class TypeFrom>
118inline TypeTo* implicit_ptr_cast( TypeFrom* t ) { return t; }
119
120} // end namespace Teuchos
121
122#endif // TEUCHOS_IMPLICIT_CAST_HPP
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Smart reference counting pointer class for automatic garbage collection.
TypeTo & implicit_ref_cast(TypeFrom &t)
Perform an implicit cast of reference types with a reference being returned.
TypeTo implicit_cast(const TypeFrom &t)
Perform an implicit cast of concrete types with the casted object returned by value.
TypeTo * implicit_ptr_cast(TypeFrom *t)
Perform an implicit cast of pointer types with a pointer being returned.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...