// { dg-do compile { target c++17 } } // PR 117858 std::optional with a constructor template ctor(T) // PR 117889 Failure to build qtwebengine-6.8.1 #include struct Focus { template Focus(T) { } }; void test_pr117858(std::optional& f) { f = f; f = std::move(f); } void test_pr117889(std::optional& f) { std::optional f2 = f; std::optional f3 = std::move(f); }