Ice Sheet System Model  4.18
Code documentation
Functions
recast.h File Reference

Go to the source code of this file.

Functions

template<class To , class From >
To reCast (const From &from)
 
template<class To , class From >
To xDynamicCast (const From &from)
 

Function Documentation

◆ reCast()

template<class To , class From >
To reCast ( const From &  from)

Definition at line 19 of file recast.h.

19  {
20  return (To)from;
21 }

◆ xDynamicCast()

template<class To , class From >
To xDynamicCast ( const From &  from)

Definition at line 51 of file recast.h.

51  {
52 
53  /*C-like cast (fast but not safe)*/
54  return (To) from;
55 
56  /*C++ dynamic_cast, poor performance but safer*/
57  //return dynamic_cast<To>(from);
58 }