diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-01 07:19:38 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-02 11:28:08 +0200 |
| commit | 724b9693897642497ca5feee65546dc670bed722 (patch) | |
| tree | f5ff5479b2e08294f3d4f6d45e8f22f8404432ff /libs/kstd/include | |
| parent | 5f084e49a27e73fdf9ca88f46121618d9fae399f (diff) | |
| download | teachos-724b9693897642497ca5feee65546dc670bed722.tar.xz teachos-724b9693897642497ca5feee65546dc670bed722.zip | |
kstd/observer_ptr: extend test suite
Diffstat (limited to 'libs/kstd/include')
| -rw-r--r-- | libs/kstd/include/kstd/observer_ptr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/kstd/include/kstd/observer_ptr b/libs/kstd/include/kstd/observer_ptr index 97c9e5e..a328331 100644 --- a/libs/kstd/include/kstd/observer_ptr +++ b/libs/kstd/include/kstd/observer_ptr @@ -85,7 +85,7 @@ namespace kstd //! Get the currently watched object. //! //! @return A reference to the currently watched object. - [[nodiscard]] constexpr auto operator*() const noexcept -> std::add_lvalue_reference_t<element_type> + [[nodiscard]] constexpr auto operator*() const -> std::add_lvalue_reference_t<element_type> { throw_on_null(); return *m_ptr; @@ -94,7 +94,7 @@ namespace kstd //! Get the currently watched object. //! //! @return A pointer to the currently watched object. - [[nodiscard]] constexpr auto operator->() const noexcept -> element_type * + [[nodiscard]] constexpr auto operator->() const -> element_type * { throw_on_null(); return m_ptr; @@ -109,7 +109,7 @@ namespace kstd } //! Compare the observer pointer with another observer pointer. - //! + //!> //! @param other The other observer pointer to compare with. //! @return The result of the comparison. constexpr auto operator<=>(observer_ptr const & other) const noexcept -> std::strong_ordering = default; @@ -118,7 +118,7 @@ namespace kstd //! Throw an exception if the observer pointer is null. //! //! @throws std::runtime_error if the observer pointer is null. - constexpr auto throw_on_null() const noexcept -> void + constexpr auto throw_on_null() const -> void { if (m_ptr == nullptr) { |
