diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-27 14:28:26 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-27 14:28:46 +0300 |
commit | 235015910133aaa50f8398680357af4a92e12778 (patch) | |
tree | 98756bfb123234bf68c3d5546e63668813f408c8 /source/blender/functions/FN_cpp_type.hh | |
parent | 563670ff9e7421abc87095dab78e89ef23499253 (diff) |
Cleanup: make it easier to check if a CPPType is a specific compile time type
Diffstat (limited to 'source/blender/functions/FN_cpp_type.hh')
-rw-r--r-- | source/blender/functions/FN_cpp_type.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/functions/FN_cpp_type.hh b/source/blender/functions/FN_cpp_type.hh index e44ce858b74..706ff85bdf3 100644 --- a/source/blender/functions/FN_cpp_type.hh +++ b/source/blender/functions/FN_cpp_type.hh @@ -483,6 +483,11 @@ class CPPType { template<typename T> static const CPPType &get(); + template<typename T> bool is() const + { + return this == &CPPType::get<T>(); + } + private: uint m_size; uint m_alignment; |