From d99cd97f858193a1c82b5e9f63e03da85285e0c6 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 16 Feb 2015 08:22:35 +0000 Subject: [PATCH] Switch our index sequence away from template aliases and just use classes. We can't use template aliases because on MSVC they don't appear to work correctly in the common usage such as Format.h. Many thanks to Zach for doing all the testing and debugging here. I just slotted the fix into the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229362 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/STLExtras.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index ed77385c71a..57af18e303b 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -203,18 +203,18 @@ template struct integer_sequence { static LLVM_CONSTEXPR size_t size() { return sizeof...(I); } }; +/// \brief Alias for the common case of a sequence of size_ts. +template +struct index_sequence : integer_sequence {}; + template struct build_index_impl : build_index_impl {}; template -struct build_index_impl<0, I...> : integer_sequence {}; - -/// \brief Alias for the common case of a sequence of size_ts. -template -using index_sequence = integer_sequence; +struct build_index_impl<0, I...> : index_sequence {}; /// \brief Creates a compile-time integer sequence for a parameter pack. template -using index_sequence_for = build_index_impl; +struct index_sequence_for : build_index_impl {}; //===----------------------------------------------------------------------===// // Extra additions for arrays -- 2.34.1