Skip to content

Commit

Permalink
Fix type mismatch when move nostd::shared_ptr (#1815)
Browse files Browse the repository at this point in the history
L
  • Loading branch information
owent authored Nov 29, 2022
1 parent 33d244a commit 7e26a7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/include/opentelemetry/nostd/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class shared_ptr
typename std::enable_if<std::is_convertible<pointer, U *>::value>::type * = nullptr>
void MoveTo(typename shared_ptr<U>::PlacementBuffer &buffer) noexcept
{
new (buffer.data) shared_ptr_wrapper{std::move(this->ptr_)};
using other_shared_ptr_wrapper = typename shared_ptr<U>::shared_ptr_wrapper;
new (buffer.data) other_shared_ptr_wrapper{std::move(this->ptr_)};
}

virtual pointer Get() const noexcept { return ptr_.get(); }
Expand Down

0 comments on commit 7e26a7e

Please sign in to comment.