diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 07:29:42 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 12:37:20 +0100 |
commit | f60c3734e38408b97e10e29a6c1d8780770d5b79 (patch) | |
tree | 20f778f31725b8960d13a04388757b2f53fa0164 /compat | |
parent | 48b8e559cd72c95a5f72de625a608e85026e3785 (diff) |
compat/prelude: add operator""_uz() for size_t
Diffstat (limited to 'compat')
-rw-r--r-- | compat/format.hpp | 2 | ||||
-rw-r--r-- | compat/prelude.hpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compat/format.hpp b/compat/format.hpp index 1432d847..bf6e8861 100644 --- a/compat/format.hpp +++ b/compat/format.hpp @@ -27,7 +27,7 @@ struct fmt_string final { template <std::size_t... Is> consteval fmt_string(const char (&arr)[N]) noexcept { - for (std::size_t i = 0; i < N; i++) + for (auto i = 0_uz; i < N; i++) data[i] = arr[i]; } }; diff --git a/compat/prelude.hpp b/compat/prelude.hpp index ab2fdfd2..5520ded8 100644 --- a/compat/prelude.hpp +++ b/compat/prelude.hpp @@ -47,3 +47,5 @@ namespace floormat { using Error [[maybe_unused]] = ::Corrade::Utility::Error; namespace Path = Corrade::Utility::Path; // NOLINT(misc-unused-alias-decls) } // namespace floormat + +consteval auto operator""_uz(unsigned long long int x) { return ::floormat::types::size_t(x); } |