From e7343bfdf02c9676ca7973a5f8d3eb2bb105e5e3 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Thu, 26 Oct 2023 14:32:30 +0200 Subject: [PATCH] patch: updated the generated code --- cwl_v1_2.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cwl_v1_2.h b/cwl_v1_2.h index a1ce405..16bdcd2 100644 --- a/cwl_v1_2.h +++ b/cwl_v1_2.h @@ -170,12 +170,12 @@ class heap_object { public: using value_t = T; - heap_object() noexcept(false) = default; + heap_object() = default; heap_object(heap_object const& oth) { *data = *oth; } - heap_object(heap_object&& oth) { - *data = *oth; + heap_object(heap_object&& oth) noexcept(noexcept(*data = std::move(*oth))) { + *data = std::move(*oth); } template @@ -183,15 +183,15 @@ class heap_object { *data = oth; } template - heap_object(T2&& oth) { - *data = oth; + heap_object(T2&& oth) noexcept(noexcept(*data = std::forward(oth))) { + *data = std::forward(oth); } auto operator=(heap_object const& oth) -> heap_object& { *data = *oth; return *this; } - auto operator=(heap_object&& oth) -> heap_object& { + auto operator=(heap_object&& oth) noexcept(noexcept(*data = std::move(*oth))) -> heap_object& { *data = std::move(*oth); return *this; } @@ -202,21 +202,21 @@ class heap_object { return *this; } template - auto operator=(T2&& oth) -> heap_object& { - *data = std::move(oth); + auto operator=(T2&& oth) noexcept(noexcept(*data = std::forward(oth))) -> heap_object& { + *data = std::forward(oth); return *this; } - auto operator->() -> T* { + auto operator->() noexcept(true) -> T* { return data.get(); } - auto operator->() const -> T const* { + auto operator->() const noexcept(true) -> T const* { return data.get(); } - auto operator*() -> T& { + auto operator*() noexcept(true) -> T& { return *data; } - auto operator*() const -> T const& { + auto operator*() const noexcept(true) -> T const& { return *data; } };