blob: 345570159e5d478527664d20a6d51fe6799e9a88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Utility functions and types for working with static types.
#pragma once
template<typename T1, typename T2>
struct IsSameType
{
static const bool result = false;
};
template<typename T>
struct IsSameType<T, T>
{
static const bool result = true;
};
template<typename Expected, typename Actual>
inline bool IsOfType (Actual& value)
{
return IsSameType<Actual, Expected>::result;
}
|