Files
Towards/external/loft/modules/base/include/props.hpp
T

12 lines
510 B
C++
Raw Normal View History

2026-07-18 14:31:15 +02:00
#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