Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4ReferenceCast.hh File Reference

Go to the source code of this file.

Functions

template<typename ReturnType , typename OriginalType >
ReturnType & reference_cast (OriginalType &source)
 
template<typename ReturnType , typename OriginalType >
ReturnType & reference_cast (ReturnType &, OriginalType &source)
 

Function Documentation

◆ reference_cast() [1/2]

template<typename ReturnType , typename OriginalType >
ReturnType & reference_cast ( OriginalType &  source)

Definition at line 32 of file G4ReferenceCast.hh.

33{
34 return (ReturnType &) source;
35}

◆ reference_cast() [2/2]

template<typename ReturnType , typename OriginalType >
ReturnType & reference_cast ( ReturnType &  ,
OriginalType &  source 
)

Definition at line 39 of file G4ReferenceCast.hh.

40{
41 return (ReturnType &) source;
42}