##// END OF EJS Templates
Added cpp_utils header to host cpp tricks...
jeandet -
r38:8aaed85ac7f5
parent child
Show More
@@ -0,0 +1,21
1 #ifndef CPP_UTILS_H
2 #define CPP_UTILS_H
3
4 #include <type_traits>
5
6 template< class... >
7 using void_t = void;
8
9 #define HAS_METHOD(method)\
10 template <class T, class=void>\
11 struct _has_##method : std::false_type{};\
12 \
13 template <class T>\
14 struct _has_##method<T, void_t<std::is_member_function_pointer<decltype(&T::method)>>>\
15 : std::true_type{};\
16 \
17 template< class T>\
18 static inline constexpr bool has_##method = _has_##method<T>::value;
19
20
21 #endif // CPP_UTILS_H
@@ -64,6 +64,7 FILE (GLOB_RECURSE core_SRCS
64 ./include/Common/deprecate.h
64 ./include/Common/deprecate.h
65 ./include/Common/containers.h
65 ./include/Common/containers.h
66 ./include/Common/debug.h
66 ./include/Common/debug.h
67 ./include/Common/cpp_utils.h
67 ./include/Plugin/IPlugin.h
68 ./include/Plugin/IPlugin.h
68 ./include/Data/ArrayDataIterator.h
69 ./include/Data/ArrayDataIterator.h
69 ./include/Data/VariableRequest.h
70 ./include/Data/VariableRequest.h
General Comments 0
You need to be logged in to leave comments. Login now