mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-25 04:56:13 +08:00
Fix optional<char> test breakage
It seems GCC and clang disagree. Talked to mclow on IRC, disabling for now. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,11 +43,15 @@ int main()
|
|||||||
|
|
||||||
{
|
{
|
||||||
// optional(const optional &);
|
// 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<char> source('A');
|
||||||
std::optional opt(source);
|
std::optional opt(source);
|
||||||
static_assert(std::is_same_v<decltype(opt), std::optional<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(static_cast<bool>(opt) == static_cast<bool>(source));
|
||||||
assert(*opt == *source);
|
assert(*opt == *source);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user