This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Use a type that is always an aggregate in variant's tests
ClosedPublic

Authored by ldionne on Nov 20 2018, 12:06 PM.

Details

Summary

In PR39232, we noticed that some variant tests started failing in C++2a mode
with recent Clangs, because the rules for literal types changed in C++2a. As
a result, a temporary fix was checked in (enabling the test only in C++17).

This commit is what I believe should be the long term fix: I removed the
tests that checked constexpr default-constructibility with a weird type
from the tests for index() and valueless_by_exception(), and instead I
added tests for those using an obviously literal type in the test for the
default constructor.

Diff Detail

Repository
rL LLVM

Event Timeline

ldionne created this revision.Nov 20 2018, 12:06 PM
This revision is now accepted and ready to land.Nov 26 2018, 6:03 AM
This revision was automatically updated to reflect the committed changes.