diff --git a/src/lib/utils/dyn_load/dyn_load.h b/src/lib/utils/dyn_load/dyn_load.h index 74094d3b72..cce4b7dd7f 100644 --- a/src/lib/utils/dyn_load/dyn_load.h +++ b/src/lib/utils/dyn_load/dyn_load.h @@ -48,7 +48,7 @@ class BOTAN_TEST_API Dynamically_Loaded_Library final { requires(std::is_pointer_v) { void* addr = resolve_symbol_internal(symbol); - return addr ? reinterpret_cast(addr) : std::nullopt; + return addr ? std::optional(reinterpret_cast(addr)) : std::nullopt; } /**