From 69f00c519bd5d59a3860c045172bb8d13ce24db2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 6 May 2022 18:22:44 +0100 Subject: Allow implicit conversion to safe --- netfs/ice/numeric.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netfs/ice/numeric.h b/netfs/ice/numeric.h index f66b98d..16af1f4 100644 --- a/netfs/ice/numeric.h +++ b/netfs/ice/numeric.h @@ -26,12 +26,13 @@ protected: template struct safe : safe_base { #ifdef __cpp_lib_source_location - constexpr explicit safe(T v, const std::source_location w = std::source_location::current()) noexcept : - value {v}, where {w} + // cppcheck-suppress noExplicitConstructor; NOLINTNEXTLINE(hicpp-explicit-conversions) + constexpr safe(T v, const std::source_location w = std::source_location::current()) noexcept : value {v}, where {w} { } #else - constexpr explicit safe(T v) noexcept : value {v} { } + // cppcheck-suppress noExplicitConstructor; NOLINTNEXTLINE(hicpp-explicit-conversions) + constexpr safe(T v) noexcept : value {v} { } #endif // NOLINTNEXTLINE(hicpp-explicit-conversions) -- cgit v1.2.3