[PATCH] D155441: [ADT] Remove SFINAE constraint from llvm::iterator_range ctor for gcc-7
Balázs Benics via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 00:15:44 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG497953b498ca: [ADT] Remove SFINAE constraint from llvm::iterator_range ctor for gcc-7 (authored by steakhal).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155441/new/
https://reviews.llvm.org/D155441
Files:
llvm/include/llvm/ADT/iterator_range.h
Index: llvm/include/llvm/ADT/iterator_range.h
===================================================================
--- llvm/include/llvm/ADT/iterator_range.h
+++ llvm/include/llvm/ADT/iterator_range.h
@@ -43,12 +43,19 @@
IteratorT begin_iterator, end_iterator;
public:
+#if __GNUC__ == 7
+ // Be careful no to break gcc-7 on the mlir target.
+ // See https://github.com/llvm/llvm-project/issues/63843
+ template <typename Container>
+#else
template <typename Container,
std::enable_if_t<explicitly_convertible<
detail::IterOfRange<Container>, IteratorT>::value> * = nullptr>
+#endif
iterator_range(Container &&c)
: begin_iterator(adl_begin(std::forward<Container>(c))),
- end_iterator(adl_end(std::forward<Container>(c))) {}
+ end_iterator(adl_end(std::forward<Container>(c))) {
+ }
iterator_range(IteratorT begin_iterator, IteratorT end_iterator)
: begin_iterator(std::move(begin_iterator)),
end_iterator(std::move(end_iterator)) {}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155441.541347.patch
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230718/b47f6ba3/attachment.bin>
More information about the llvm-commits
mailing list