From 03cc18678ed2ed8b2424ec99dee7e4655d876db5 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 25 May 2023 09:37:28 -0400 Subject: [PATCH] optional: Fix compilation on XLClang 16.1.0 The compiler rejects initialization with `= {}`: error: chosen constructor is explicit in copy-initialization Use just `{}` instead. --- include/dap/optional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dap/optional.h b/include/dap/optional.h index 7e1d283..9a3d216 100644 --- a/include/dap/optional.h +++ b/include/dap/optional.h @@ -75,7 +75,7 @@ class optional { inline T& operator*(); private: - T val = {}; + T val{}; bool set = false; };