From 552b150402450c94d983b4df00191a65a947b806 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Mon, 12 Aug 2024 17:26:37 -0400 Subject: [PATCH] check for drop func --- CMakeLists.txt | 2 +- include/blt/gp/program.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5115480..960c4c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.138) +project(blt-gp VERSION 0.0.139) include(CTest) diff --git a/include/blt/gp/program.h b/include/blt/gp/program.h index 6dce563..f044f4a 100644 --- a/include/blt/gp/program.h +++ b/include/blt/gp/program.h @@ -150,7 +150,10 @@ namespace blt::gp alloc.call_destructors(mask); break; case detail::destroy_t::RETURN: - alloc.from>(0).drop(); + if constexpr (detail::has_func_drop_v>) + { + alloc.from>(0).drop(); + } break; } });