[ create a new paste ] login | about

Link: http://codepad.org/KrmfnVeo    [ raw code | fork ]

C++, pasted on Aug 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
template<typename T, typename U>
struct DumbCast 
{
	T operator() (U u)
	{
		return reinterpret_cast<T> (u);
	}
};

template<typename T>
struct DumbCast<T, T>
{
	T operator() (T t)
	{
		return t;
	}
};


Create a new paste based on this one


Comments: