Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Fix resolve error
Browse files Browse the repository at this point in the history
  • Loading branch information
Twon committed Aug 22, 2023
1 parent 63d919b commit a097ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indirect_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ class ISOCPP_P1950_EMPTY_BASES indirect_value
constexpr explicit indirect_value(U* u, C c, D d) noexcept
: copy_base(std::move(c)), delete_base(std::move(d)), ptr_(u) {}

constexpr indirect(const indirect& i)
constexpr indirect_value(const indirect_value& i)
: copy_base(i.get_c()), delete_base(i.get_d()), ptr_(i.make_raw_copy()) {}

constexpr indirect_value(indirect_value&& i) noexcept
: copy_base(std::move(i)),
delete_base(std::move(i)),
ptr_(std::exchange(i.ptr_, nullptr)) {}

constexpr indirect& operator=(const indirect& i) {
constexpr indirect_value& operator=(const indirect_value& i) {
// When copying T throws, *this will remain unchanged.
// When assigning copy_base or delete_base throws,
// ptr_ will be null.
Expand Down

0 comments on commit a097ea6

Please sign in to comment.