[PATCH] D117254: [ADT] Fix Optional<> with llvm::is_trivially_move_constructible
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 15:12:58 PST 2022
dexonsmith added a comment.
This LGTM, but it'd be great if someone involved in the discussion for https://reviews.llvm.org/D93510 could chime in to confirm this isn't too surprising.
================
Comment at: llvm/include/llvm/ADT/Optional.h:36-42
// The specialization condition intentionally uses
// llvm::is_trivially_copy_constructible instead of
// std::is_trivially_copy_constructible. GCC versions prior to 7.4 may
// instantiate the copy constructor of `T` when
// std::is_trivially_copy_constructible is instantiated. This causes
// compilation to fail if we query the trivially copy constructible property of
// a class which is not copy constructible.
----------------
I think this comment should be expanded to cover `is_trivially_move_constructible` as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117254/new/
https://reviews.llvm.org/D117254
More information about the llvm-commits
mailing list