From f25236ff430d98b3cba5495cc68235d1d7701b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 11 Apr 2022 20:37:54 +0200 Subject: [PATCH] Small cleanup for pluralise --- src/catch2/internal/catch_string_manip.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/catch2/internal/catch_string_manip.hpp b/src/catch2/internal/catch_string_manip.hpp index 8ef47e39..dc58a336 100644 --- a/src/catch2/internal/catch_string_manip.hpp +++ b/src/catch2/internal/catch_string_manip.hpp @@ -43,16 +43,17 @@ namespace Catch { * * **Important:** The provided string must outlive the instance */ - struct pluralise { - pluralise(std::uint64_t count, StringRef label): + class pluralise { + std::uint64_t m_count; + StringRef m_label; + + public: + constexpr pluralise(std::uint64_t count, StringRef label): m_count(count), m_label(label) {} friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ); - - std::uint64_t m_count; - StringRef m_label; }; }