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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to