blob: d5d4fc5ada5874f22c3d3f57904616ad964425e2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#pragma once
#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) \
decltype(auto) METHOD() { return EXPR; }
|