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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs