diff --git a/indirect_value.h b/indirect_value.h index ca149dc..32dd1c3 100644 --- a/indirect_value.h +++ b/indirect_value.h @@ -217,7 +217,7 @@ 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 @@ -225,7 +225,7 @@ class ISOCPP_P1950_EMPTY_BASES indirect_value 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.