From e7505277a1c15c785d6194dfee51e1dd2e6b84ec Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 28 Feb 2023 10:32:09 +0800 Subject: [PATCH] 1 --- a8/a8.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/a8/a8.h b/a8/a8.h index 7471987..b784f17 100644 --- a/a8/a8.h +++ b/a8/a8.h @@ -40,4 +40,13 @@ __VA_ARGS__ \ }; \ template<> constexpr const char* GetEnumString() { return #__VA_ARGS__; }; +#define A8_MAKE_ANON_STRUCT_SHARED(...) \ +[] () \ +{ \ +struct Context \ +{ \ + __VA_ARGS__ \ +}; \ +return std::make_shared(Context);}() + const float A8_PI = 3.1415926f;