Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
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
13
#include "
Teuchos_ConfigDefs.hpp
"
14
15
namespace
Teuchos
{
16
48
template
<
class
TypeTo,
class
TypeFrom>
49
inline
TypeTo
implicit_cast
(
const
TypeFrom& t ) {
return
t; }
50
83
template
<
class
TypeTo,
class
TypeFrom>
84
inline
TypeTo&
implicit_ref_cast
( TypeFrom& t ) {
return
t; }
85
117
template
<
class
TypeTo,
class
TypeFrom>
118
inline
TypeTo*
implicit_ptr_cast
( TypeFrom* t ) {
return
t; }
119
120
}
// end namespace Teuchos
121
122
#endif
// TEUCHOS_IMPLICIT_CAST_HPP
Teuchos_ConfigDefs.hpp
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Teuchos::implicit_ref_cast
TypeTo & implicit_ref_cast(TypeFrom &t)
Perform an implicit cast of reference types with a reference being returned.
Definition
Teuchos_implicit_cast.hpp:84
Teuchos::implicit_cast
TypeTo implicit_cast(const TypeFrom &t)
Perform an implicit cast of concrete types with the casted object returned by value.
Definition
Teuchos_implicit_cast.hpp:49
Teuchos::implicit_ptr_cast
TypeTo * implicit_ptr_cast(TypeFrom *t)
Perform an implicit cast of pointer types with a pointer being returned.
Definition
Teuchos_implicit_cast.hpp:118
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0