Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-06-27 14:28:26 +0300
committerJacques Lucke <jacques@blender.org>2020-06-27 14:28:46 +0300
commit235015910133aaa50f8398680357af4a92e12778 (patch)
tree98756bfb123234bf68c3d5546e63668813f408c8 /source/blender/functions/FN_cpp_type.hh
parent563670ff9e7421abc87095dab78e89ef23499253 (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.hh5
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;