AUI_PERFORM_AS_MEMBER#
Performs multiple operations on a single object without repeating its name.
| Header: | #include <AUI/Util/kAUI.h> |
| CMake: | aui_link(my_target PUBLIC aui::core) |
Definition#
#define AUI_PERFORM_AS_MEMBER(object, lambda) \
struct __apply##__FUNCTION__##__LINE__ : std::decay_t<decltype(object)> { void operator()() { lambda; \
} \
} \
; \
(static_cast<__apply##__FUNCTION__##__LINE__&>(object))()
Detailed Description#
It's an analogue to with, apply in Kotlin.
| without | with |