diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp index be17aa6fc518..b5362589963c 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp @@ -81,8 +81,8 @@ void test_multi_arg() { test_one_arg(); using Opt = std::optional; - Opt opt; { + Opt opt; opt.emplace(101, 41); assert(static_cast(opt) == true); assert(*opt == T(101, 41));