Skip to content

Commit

Permalink
Remove redundant macro check in nostd::shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Jan 27, 2023
1 parent 52309dd commit dd1ddab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions api/include/opentelemetry/nostd/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,11 @@ class shared_ptr
new (buffer_.data) shared_ptr_wrapper{std::move(ptr_)};
}

# ifndef HAVE_CPP_STDLIB
shared_ptr(std::unique_ptr<T> &&other) noexcept
{
std::shared_ptr<T> ptr_(other.release());
new (buffer_.data) shared_ptr_wrapper{std::move(ptr_)};
}
# endif

~shared_ptr() { wrapper().~shared_ptr_wrapper(); }

Expand Down

0 comments on commit dd1ddab

Please sign in to comment.