[PATCH] D78938: Make LLVM build in C++20 mode
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 28 13:59:57 PDT 2020
dblaikie added inline comments.
================
Comment at: llvm/include/llvm/IR/BasicBlock.h:324-325
+ template <typename PHINodeU, typename BBIteratorU,
+ typename = std::enable_if_t<
+ std::is_convertible<PHINodeU *, PHINodeT *>::value>>
phi_iterator_impl(const phi_iterator_impl<PHINodeU, BBIteratorU> &Arg)
----------------
BRevzin wrote:
> dblaikie wrote:
> > What tripped over/required this SFINAE?
> There's somewhere which compared a const iterator to a non-const iterator, that ends up doing conversions in both directions under C++20 rules, one direction of which is perfectly fine and the other was a hard error. Need to make the non-const iterator not constructible from a const iterator.
Is this true for all iterators? Or some quirk of how this one is written/used (that could be fixed/changed there instead)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78938/new/
https://reviews.llvm.org/D78938
More information about the cfe-commits
mailing list