mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-04-22 00:40:46 +03:00
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
#pragma once
|
|
|
|
// clang-format off
|
|
#define FOR_PACK(PACK_TYPE, PACK_NAME, VAR, CODE) \
|
|
{ \
|
|
[[maybe_unused]] int dummy[] { \
|
|
( \
|
|
[&](PACK_TYPE VAR) { \
|
|
CODE; \
|
|
return 0; \
|
|
} \
|
|
)(PACK_NAME)... \
|
|
}; \
|
|
}
|
|
// clang-format on
|
|
|
|
// clang-format off
|
|
#define FOR_PACK_S(PACK_TYPE, VAR_TYPE, CODE) \
|
|
{ \
|
|
[[maybe_unused]] int dummy[] { \
|
|
( \
|
|
[&]() { \
|
|
using VAR_TYPE = PACK_TYPE; \
|
|
CODE; \
|
|
return 0; \
|
|
} \
|
|
)()... \
|
|
}; \
|
|
}
|
|
// clang-format on
|
|
|
|
namespace progressia {
|
|
namespace main {
|
|
|
|
struct NonCopyable {
|
|
NonCopyable &operator=(const NonCopyable &) = delete;
|
|
NonCopyable(const NonCopyable &) = delete;
|
|
NonCopyable() = default;
|
|
};
|
|
|
|
} // namespace main
|
|
} // namespace progressia
|