Skip to content

Commit 1cae92e

Browse files
committed
Update headers.
1 parent 22e1de1 commit 1cae92e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/rice/rice.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10283,8 +10283,9 @@ namespace Rice::detail
1028310283
if constexpr (is_complete_v<T>)
1028410284
{
1028510285
// is_abstract_v requires a complete type, so nest inside is_complete_v.
10286-
// Deleting an abstract class through a non-virtual destructor is UB.
10287-
if constexpr (std::is_destructible_v<T> && !std::is_abstract_v<T>)
10286+
// Deleting an abstract class through a non-virtual destructor is UB,
10287+
// but it is safe if the destructor is virtual.
10288+
if constexpr (std::is_destructible_v<T> && (!std::is_abstract_v<T> || std::has_virtual_destructor_v<T>))
1028810289
{
1028910290
if (this->isOwner_)
1029010291
{

0 commit comments

Comments
 (0)