Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #ifndef _OPERATORCHECK_H_
- #define _OPERATORCHECK_H_
- namespace OperatorCheck
- {
- typedef char no[7];
- template<typename T> no& operator == (const T&, const T&);
- template <typename T>
- struct opEqualExists
- {
- enum { value = (sizeof(*new T[1] == *new T[1]) != sizeof(no)) };
- };
- }
- #define IsEqualOperatorExists(expr) (OperatorCheck::opEqualExists<expr>::value == 1 ? true : false)
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement