[llvm-bugs] [Bug 41577] New: test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp has wrong assumption
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 24 05:08:15 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41577
Bug ID: 41577
Summary: test/std/utilities/optional/optional.object/optional.o
bject.ctor/move.fail.cpp has wrong assumption
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: zilla at kayari.org
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp
This test assumes that move construction is not constexpr, based on this old
wording quoted in the test:
// constexpr optional(const optional<T>&& rhs);
// If is_trivially_move_constructible_v<T> is true,
// this constructor shall be a constexpr constructor.
That was replaced by https://wg21.link/p0602r4 and now it says:
"If is_trivially_move_constructible_v<T> is true, this constructor is trivial."
That means the constructor might still be constexpr even if it's non-trivial.
It's not clear to me whether the constructor is *required* to be constexpr, but
I think the test is wrong to assume the move construction *can't* be constexpr
(the test compiles using the std::optional from libstdc++, but 'lit' expects it
to be ill-formed).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190424/b0c5eaf2/attachment-0001.html>
More information about the llvm-bugs
mailing list