mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-08 08:12:57 +12:00
Some checks are pending
Android Build / x64 (release) (push) Waiting to run
Android Build / arm64 (release) (push) Waiting to run
HTTP Server Build / build (push) Waiting to run
Hydra Core Build / Windows (push) Waiting to run
Hydra Core Build / MacOS (push) Waiting to run
Hydra Core Build / Linux (push) Waiting to run
Hydra Core Build / Android-x64 (push) Waiting to run
Hydra Core Build / ARM-Libretro (push) Waiting to run
Linux AppImage Build / build (push) Waiting to run
Linux Build / build (push) Waiting to run
MacOS Build / MacOS-arm64 (push) Waiting to run
MacOS Build / MacOS-x86_64 (push) Waiting to run
MacOS Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Windows (push) Waiting to run
Qt Build / MacOS-arm64 (push) Waiting to run
Qt Build / MacOS-x86_64 (push) Waiting to run
Qt Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Linux (push) Waiting to run
Windows Build / build (push) Waiting to run
iOS Simulator Build / build (push) Waiting to run
16 lines
No EOL
605 B
C++
16 lines
No EOL
605 B
C++
#pragma once
|
|
#include <type_traits>
|
|
#include <utility>
|
|
|
|
namespace Helpers {
|
|
/// Used to make the compiler evaluate beeg loops at compile time for things like generating compile-time tables
|
|
template <typename T, T Begin, class Func, T... Is>
|
|
static constexpr void static_for_impl(Func&& f, std::integer_sequence<T, Is...>) {
|
|
(f(std::integral_constant<T, Begin + Is>{}), ...);
|
|
}
|
|
|
|
template <typename T, T Begin, T End, class Func>
|
|
static constexpr void static_for(Func&& f) {
|
|
static_for_impl<T, Begin>(std::forward<Func>(f), std::make_integer_sequence<T, End - Begin>{});
|
|
}
|
|
} // namespace Helpers
|