Sfoglia il codice sorgente

Fix optional deduction guide test breakage

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333308 91177308-0d34-0410-b5e6-96231b3b80d8
JF Bastien 7 anni fa
parent
commit
599bf43e56

+ 1 - 1
test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp

@@ -28,7 +28,7 @@ int main()
 //  Test the implicit deduction guides
     {
 //  optional()
-    std::optional opt;   // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'optional'}}
+    std::optional opt;   // expected-error {{declaration of variable 'opt' with deduced type 'std::optional' requires an initializer}}
     }
 
     {

+ 1 - 1
test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp

@@ -45,7 +45,7 @@ int main()
 //  optional(const optional &);
     std::optional<char> source('A');
     std::optional opt(source);
-    static_assert(std::is_same_v<decltype(opt), std::optional<char>>, "");
+    static_assert(std::is_same_v<decltype(opt), std::optional<std::optional<char>>>, "");
     assert(static_cast<bool>(opt) == static_cast<bool>(source));
     assert(*opt == *source);
     }