Skip to content

Commit

Permalink
patch: updated the generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
SGSSGene committed Oct 26, 2023
1 parent c9b5473 commit e7343bf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cwl_v1_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,28 @@ 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 <typename T2>
heap_object(T2 const& oth) {
*data = oth;
}
template <typename T2>
heap_object(T2&& oth) {
*data = oth;
heap_object(T2&& oth) noexcept(noexcept(*data = std::forward<T2>(oth))) {
*data = std::forward<T2>(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;
}
Expand All @@ -202,21 +202,21 @@ class heap_object {
return *this;
}
template <typename T2>
auto operator=(T2&& oth) -> heap_object& {
*data = std::move(oth);
auto operator=(T2&& oth) noexcept(noexcept(*data = std::forward<T2>(oth))) -> heap_object& {
*data = std::forward<T2>(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;
}
};
Expand Down

0 comments on commit e7343bf

Please sign in to comment.