[libcxx] r333308 - Fix optional deduction guide test breakage
JF Bastien via cfe-commits
cfe-commits at lists.llvm.org
Fri May 25 13:43:57 PDT 2018
Author: jfb
Date: Fri May 25 13:43:57 2018
New Revision: 333308
URL: http://llvm.org/viewvc/llvm-project?rev=333308&view=rev
Log:
Fix optional deduction guide test breakage
Modified:
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp
Modified: libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp?rev=333308&r1=333307&r2=333308&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp Fri May 25 13:43:57 2018
@@ -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}}
}
{
Modified: libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp?rev=333308&r1=333307&r2=333308&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp Fri May 25 13:43:57 2018
@@ -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);
}
More information about the cfe-commits
mailing list