[PATCH] D23217: [ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 11:53:02 PDT 2016
dblaikie accepted this revision.
This revision is now accepted and ready to land.
================
Comment at: unittests/Support/IteratorTest.cpp:101
@@ -100,1 +100,3 @@
+TEST(IteratorAdaptorBaseTest, ForwardTypedefs) {
+ struct WeirdIter
----------------
This doesn't need to be in a test case, since none of it executes dynamically - probably just put it in a namespace (so it doesn't provide any names that might interfere with other tests)
================
Comment at: unittests/Support/IteratorTest.cpp:103
@@ +102,3 @@
+ struct WeirdIter
+ : std::iterator<std::input_iterator_tag, int, int, int, int> {};
+ struct AdaptedIter : iterator_adaptor_base<AdaptedIter, WeirdIter> {};
----------------
Maybe worth introducing some arbitrary tag types (just random structs with helpful names like ValueType, PointerType, DifferenceType, ReferenceType) rather than using all ints - so it's clear the types aren't getting mismatched or anything?
https://reviews.llvm.org/D23217
More information about the llvm-commits
mailing list