Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion llvm/include/llvm/ADT/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,17 @@ class iterator_facade_base {
using pointer = PointerT;
using reference = ReferenceT;

protected:
// Note: These were previously protected, but MSVC has trouble with SFINAE
// accessing protected members in derived class templates (specifically in
// iterator_adaptor_base::operator-). Making them public fixes the build.
enum {
IsRandomAccess = std::is_base_of<std::random_access_iterator_tag,
IteratorCategoryT>::value,
IsBidirectional = std::is_base_of<std::bidirectional_iterator_tag,
IteratorCategoryT>::value,
};

protected:
/// A proxy object for computing a reference via indirecting a copy of an
/// iterator. This is used in APIs which need to produce a reference via
/// indirection but for which the iterator object might be a temporary. The
Expand Down