Files
Towards/external/loft/modules/base/include/props.hpp
T
Martin Slachta a04f0dc262 initial
2026-07-18 14:31:15 +02:00

12 lines
510 B
C++

#pragma once
#if _WIN32
#define GET(slot, name) const inline decltype(slot) name() const { return slot; }
#define REF(slot, name) const inline decltype(slot)& name() const { return slot; }
#else
#define GET(slot, name) [[nodiscard("Do not discard result of a getter! Use the result!")]] \
const inline __typeof(slot) name() const { return slot; }
#define REF(slot, name) [[nodiscard("Do not discard result of a getter! Use the result!")]] \
const inline __typeof(slot)& name() const { return slot; }
#endif