diff --git a/include/dap/any.h b/include/dap/any.h index 4a6444c..7e6553f 100644 --- a/include/dap/any.h +++ b/include/dap/any.h @@ -143,6 +143,9 @@ any& any::operator=(const T& val) { alloc(type->size(), type->alignment()); type->copyConstruct(value, &val); } else { +#ifdef __clang_analyzer__ + assert(value != nullptr); +#endif *reinterpret_cast(value) = val; } return *this;