HerdSoftware  0.3.2
TypeUtils.h
Go to the documentation of this file.
1 /*
2  * TypeUtils.h
3  *
4  * Created on: 7 Feb 2022
5  * Author: Valerio Formato
6  */
7 
10 #ifndef HERD_TYPEUTILS_H_
11 #define HERD_TYPEUTILS_H_
12 
13 #include <type_traits>
14 
15 namespace Herd {
16 
17 template <class... Args> class Param {
18 public:
19  template <class R> static R Func(R (*)(Args...));
20  // non const member function overload
21  template <class R, class C> static R Func(R (C::*)(Args...));
22  // const member function overload
23  template <class R, class C> static R Func(R (C::*)(Args...) const);
24 };
25 
26 #define ReturnTypeOf(f, ...) decltype(Param<__VA_ARGS__>::Func(f))
27 
28 } // namespace Herd
29 
30 #endif
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
Definition: TypeUtils.h:17
static R Func(R(*)(Args...))