blob: 0650ac29ff466ba4a250d092a95412210110a9ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
#define DELEGATE(OBJ, METHOD, METHOD_AS) \
template <typename... Args> decltype(auto) METHOD_AS(Args &&...args) { \
return OBJ->METHOD(std::forward<Args>(args)...); \
}
#define DEFINE_SETTER(METHOD, PROPERTY) \
template <typename Arg> void METHOD(Arg val) { PROPERTY = val; }
#define DEFINE_GETTER(METHOD, EXPR) \
template <typename Arg> decltype(auto) METHOD() { return EXPR; }
|