check for drop func

thread
Brett 2024-08-12 17:26:37 -04:00
parent 966d64d239
commit 552b150402
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.25)
project(blt-gp VERSION 0.0.138) project(blt-gp VERSION 0.0.139)
include(CTest) include(CTest)

View File

@ -150,7 +150,10 @@ namespace blt::gp
alloc.call_destructors<Args...>(mask); alloc.call_destructors<Args...>(mask);
break; break;
case detail::destroy_t::RETURN: case detail::destroy_t::RETURN:
if constexpr (detail::has_func_drop_v<remove_cvref_t<Return>>)
{
alloc.from<detail::remove_cv_ref<Return>>(0).drop(); alloc.from<detail::remove_cv_ref<Return>>(0).drop();
}
break; break;
} }
}); });