[libcxx] r333317 - Fix optional<char> test breakage
JF Bastien via cfe-commits
cfe-commits at lists.llvm.org
Fri May 25 14:32:27 PDT 2018
Author: jfb
Date: Fri May 25 14:32:27 2018
New Revision: 333317
URL: http://llvm.org/viewvc/llvm-project?rev=333317&view=rev
Log:
Fix optional<char> test breakage
It seems GCC and clang disagree. Talked to mclow on IRC, disabling for now.
Modified:
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.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp?rev=333317&r1=333316&r2=333317&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 14:32:27 2018
@@ -43,11 +43,15 @@ int main()
{
// optional(const optional &);
+ // FIXME clang and GCC disagree about this!
+ // clang thinks opt is optional<optional<char>>, GCC thinks it's optional<char>.
+#if 0
std::optional<char> source('A');
std::optional opt(source);
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);
+#endif
}
}
More information about the cfe-commits
mailing list