diff --git a/include/anyany/anyany.hpp b/include/anyany/anyany.hpp index c58b83c..c090aa7 100644 --- a/include/anyany/anyany.hpp +++ b/include/anyany/anyany.hpp @@ -1549,7 +1549,7 @@ struct basic_any : construct_interface, Me value_ptr = alloc.allocate(bytes); size_allocated = bytes; #if __cpp_exceptions - return scope_failure([this] { deallocate_memory(); }); + return scope_failure{[this] { deallocate_memory(); }}; #else return noexport::noop_guard{}; #endif