From b2dbc1e69a12827e1f2e83a61d4146b77d9d7a98 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 13 Jan 2025 19:18:52 +0100 Subject: [PATCH] refactor: `std::convertible_to` replaced with `std::same_as` in `basic_fixed_string` --- src/core/include/mp-units/ext/fixed_string.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/include/mp-units/ext/fixed_string.h b/src/core/include/mp-units/ext/fixed_string.h index 05fb4c83..f2155a06 100644 --- a/src/core/include/mp-units/ext/fixed_string.h +++ b/src/core/include/mp-units/ext/fixed_string.h @@ -80,7 +80,7 @@ public: using difference_type = std::ptrdiff_t; // construction and assignment - template... Chars> + template... Chars> requires(sizeof...(Chars) == N) && (... && !std::is_pointer_v) constexpr explicit basic_fixed_string(Chars... chars) noexcept : data_{chars..., CharT{}} { @@ -94,7 +94,7 @@ public: } template S> - requires std::convertible_to, CharT> + requires std::same_as, CharT> constexpr basic_fixed_string(It begin, S end) { MP_UNITS_EXPECTS(std::distance(begin, end) == N); @@ -102,7 +102,7 @@ public: } template - requires std::convertible_to, CharT> + requires std::same_as, CharT> constexpr basic_fixed_string(std::from_range_t, R&& r) { MP_UNITS_EXPECTS(std::ranges::size(r) == N); @@ -260,7 +260,7 @@ public: }; // deduction guides -template... Rest> +template... Rest> basic_fixed_string(CharT, Rest...) -> basic_fixed_string; template