From e9c8e851eedeabe82878ef9d41042731c4d17e6d Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 3 Sep 2026 14:07:25 +0200 Subject: chore: add missing explicit specifiers --- libs/kstd/kstd/bits/observer_ptr.hpp | 2 ++ libs/kstd/kstd/bits/shared_ptr.hpp | 4 ++++ libs/kstd/kstd/system_error.hpp | 4 ++++ 3 files changed, 10 insertions(+) (limited to 'libs/kstd') diff --git a/libs/kstd/kstd/bits/observer_ptr.hpp b/libs/kstd/kstd/bits/observer_ptr.hpp index 260d9d33..d53ab5a0 100644 --- a/libs/kstd/kstd/bits/observer_ptr.hpp +++ b/libs/kstd/kstd/bits/observer_ptr.hpp @@ -24,6 +24,8 @@ namespace kstd constexpr observer_ptr() noexcept = default; //! Construct an empty observer pointer from a null pointer. + //! + //! @note this constructor is deliberately not explicit, as required by the standard. constexpr observer_ptr(std::nullptr_t) noexcept {} //! Construct an observer pointer from a raw pointer. diff --git a/libs/kstd/kstd/bits/shared_ptr.hpp b/libs/kstd/kstd/bits/shared_ptr.hpp index 1c1ae08c..378030dc 100644 --- a/libs/kstd/kstd/bits/shared_ptr.hpp +++ b/libs/kstd/kstd/bits/shared_ptr.hpp @@ -227,6 +227,8 @@ namespace kstd } //! Construct a weak pointer which shares ownership of the object managed by other. + //! + //! @note this constructor is deliberately not explicit, as required by the standard. template requires bits::is_shared_pointer_ctor_compatible::value constexpr weak_ptr(weak_ptr const & other) noexcept @@ -452,6 +454,8 @@ namespace kstd {} //! @brief Construct an empty shared pointer. + //! + //! @note this constructor is deliberately not explicit, as required by the standard. constexpr shared_ptr(std::nullptr_t) noexcept : m_pointer(nullptr) , m_control_block(nullptr) diff --git a/libs/kstd/kstd/system_error.hpp b/libs/kstd/kstd/system_error.hpp index d6e78ffe..3b8e628a 100644 --- a/libs/kstd/kstd/system_error.hpp +++ b/libs/kstd/kstd/system_error.hpp @@ -152,6 +152,8 @@ namespace kstd //! Construct an error condition from an error condition enumeration value. //! + //! @note this constructor is deliberately not explicit, as required by the standard. + //! //! @tparam Enum The error condition enumeration type. //! @param value The error condition enumeration value. template @@ -237,6 +239,8 @@ namespace kstd //! Construct an error code from an error code enumeration value. //! + //! @note this constructor is deliberately not explicit, as required by the standard. + //! //! @tparam Enum The error code enumeration type. //! @param value The error code enumeration value. template -- cgit v1.2.3