Skip to content

Commit

Permalink
simplify is_stack_allocated for non-polymorphic scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Sep 8, 2024
1 parent 181b690 commit 7ba1f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/small_unique_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace smp::detail

constexpr bool is_stack_allocated() const noexcept
{
return !std::is_constant_evaluated() && (data_ == buffer());
return !std::is_constant_evaluated() && data_;
}

constexpr small_unique_ptr_base() noexcept {}
Expand Down

0 comments on commit 7ba1f2e

Please sign in to comment.