[all-commits] [llvm/llvm-project] 1890a6: [ADT] use is_base_of inplace of is_same for random...
Nathan James via All-commits
all-commits at lists.llvm.org
Tue Jul 21 01:55:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1890a65ca17504cab4032d3c8cc0c4c568d44717
https://github.com/llvm/llvm-project/commit/1890a65ca17504cab4032d3c8cc0c4c568d44717
Author: Nathan James <n.james93 at hotmail.co.uk>
Date: 2020-07-21 (Tue, 21 Jul 2020)
Changed paths:
M llvm/include/llvm/ADT/STLExtras.h
Log Message:
-----------
[ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks
Replace `std::is_same<X, std::random_access_iterator_tag>` with `std::is_base_of<std::random_access_iterator_tag, X>` in STLExtra algos.
This doesn't have too much impact on LLVM internally as no structs derive from it.
However external projects embedding LLVM may use `std::contiguous_iterator_tag` which should be considered by these algorithms.
As well as any other potential tags people want to define derived from `std::random_access_iterator_tag`
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D84141
More information about the All-commits
mailing list