diff options
Diffstat (limited to 'llvm/include/llvm/ADT/STLExtras.h')
-rw-r--r-- | llvm/include/llvm/ADT/STLExtras.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index eb515fd4583..e6215e4ae5b 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -382,6 +382,11 @@ struct build_index_impl<0, I...> : index_sequence<I...> {}; template <class... Ts> struct index_sequence_for : build_index_impl<sizeof...(Ts)> {}; +/// Utility type to build an inheritance chain that makes it easy to rank +/// overload candidates. +template <int N> struct rank : rank<N - 1> {}; +template <> struct rank<0> {}; + //===----------------------------------------------------------------------===// // Extra additions for arrays //===----------------------------------------------------------------------===// |