mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Add is_same type trait
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3a66a68b0c
commit
404aa26b26
@ -49,6 +49,17 @@ struct is_class
|
||||
enum { value = sizeof(char) == sizeof(dont_use::is_class_helper<T>(0)) };
|
||||
};
|
||||
|
||||
/// \brief Metafunction that determines whether the two given types are
|
||||
/// equivalent.
|
||||
template<typename T, typename U>
|
||||
struct is_same {
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct is_same<T, T> {
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
// enable_if_c - Enable/disable a template based on a metafunction
|
||||
template<bool Cond, typename T = void>
|
||||
|
Loading…
Reference in New Issue
Block a user