зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1885840 - Clarify comment in TestMaybe on why move operations unexpectedly work with a non-movable type. r=glandium
As Bug 1601251 states, those operations need to be explicitly deleted for the asserts to hold. Differential Revision: https://phabricator.services.mozilla.com/D204990
This commit is contained in:
Родитель
fbe4b71f35
Коммит
3a4d791e34
|
@ -530,7 +530,8 @@ static bool TestCopyAndMove() {
|
|||
|
||||
static_assert(std::is_copy_constructible_v<Maybe<UnmovableValue>>);
|
||||
static_assert(std::is_copy_assignable_v<Maybe<UnmovableValue>>);
|
||||
// XXX Why do these static_asserts not hold?
|
||||
// TODO(Bug 1601251): Maybe<T> should delete move operations if T does not
|
||||
// support moves
|
||||
// static_assert(!std::is_move_constructible_v<Maybe<UnmovableValue>>);
|
||||
// static_assert(!std::is_move_assignable_v<Maybe<UnmovableValue>>);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче