From 7226c0e29d44b0636a0b97350dc9fbd908c0d9e5 Mon Sep 17 00:00:00 2001 From: Cameron Angus Date: Mon, 23 Sep 2024 15:09:55 +0900 Subject: [PATCH] Further minor constexpr tweaks. --- include/fmt/base.h | 2 +- include/fmt/os.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index cbc78e2d69da..9d02f25a3204 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1790,7 +1790,7 @@ template class buffer { struct buffer_traits { constexpr explicit buffer_traits(size_t) {} constexpr auto count() const -> size_t { return 0; } - FMT_CONSTEXPR auto limit(size_t size) -> size_t { return size; } + constexpr auto limit(size_t size) const -> size_t { return size; } }; class fixed_buffer_traits { diff --git a/include/fmt/os.h b/include/fmt/os.h index 1a047cd0d738..b2cc5e4b85ff 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -326,7 +326,7 @@ namespace detail { struct buffer_size { constexpr buffer_size() = default; size_t value = 0; - constexpr auto operator=(size_t val) const -> buffer_size { + FMT_CONSTEXPR auto operator=(size_t val) const -> buffer_size { auto bs = buffer_size(); bs.value = val; return bs;