[PATCH] D33919: [ADT] Make iterable SmallVector template overrides more specific

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 12:55:01 PDT 2017


fjricci added a comment.

`assign(&arr[0], &arr[2])` fails both with `is_same` and `is_convertible`. Is that an acceptable usage of `assign` (and what you meant by random access iterator)? There's already a test case for `assign(std::begin(arr), std::end(arr))`, and that works fine with `is_same`.

It looks like `random_access_iterator_tag` inherits from `input_iterator_tag` (http://en.cppreference.com/w/cpp/iterator/iterator_tags), so maybe that's why `is_same` works?


https://reviews.llvm.org/D33919





More information about the llvm-commits mailing list