@@ -490,12 +490,12 @@ class MatcherBaseImpl<Derived<Ts...>> {
490
490
491
491
template <typename F>
492
492
operator ::testing::Matcher<F>() const { // NOLINT(runtime/explicit)
493
- return Apply<F>(MakeIndexSequence <sizeof ...(Ts)>{});
493
+ return Apply<F>(std::make_index_sequence <sizeof ...(Ts)>{});
494
494
}
495
495
496
496
private:
497
497
template <typename F, std::size_t ... tuple_ids>
498
- ::testing::Matcher<F> Apply (IndexSequence <tuple_ids...>) const {
498
+ ::testing::Matcher<F> Apply (std::index_sequence <tuple_ids...>) const {
499
499
return ::testing::Matcher<F>(
500
500
new typename Derived<Ts...>::template gmock_Impl<F>(
501
501
std::get<tuple_ids>(params_)...));
@@ -3152,115 +3152,115 @@ class PairMatcher {
3152
3152
};
3153
3153
3154
3154
template <typename T, size_t ... I>
3155
- auto UnpackStructImpl (const T& t, IndexSequence <I...>, int )
3156
- -> decltype(std::tie(get<I>(t)...)) {
3155
+ auto UnpackStructImpl (const T& t, std::index_sequence <I...>,
3156
+ int ) -> decltype(std::tie(get<I>(t)...)) {
3157
3157
static_assert (std::tuple_size<T>::value == sizeof ...(I),
3158
3158
" Number of arguments doesn't match the number of fields." );
3159
3159
return std::tie (get<I>(t)...);
3160
3160
}
3161
3161
3162
3162
#if defined(__cpp_structured_bindings) && __cpp_structured_bindings >= 201606
3163
3163
template <typename T>
3164
- auto UnpackStructImpl (const T& t, MakeIndexSequence <1 >, char ) {
3164
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <1 >, char ) {
3165
3165
const auto & [a] = t;
3166
3166
return std::tie (a);
3167
3167
}
3168
3168
template <typename T>
3169
- auto UnpackStructImpl (const T& t, MakeIndexSequence <2 >, char ) {
3169
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <2 >, char ) {
3170
3170
const auto & [a, b] = t;
3171
3171
return std::tie (a, b);
3172
3172
}
3173
3173
template <typename T>
3174
- auto UnpackStructImpl (const T& t, MakeIndexSequence <3 >, char ) {
3174
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <3 >, char ) {
3175
3175
const auto & [a, b, c] = t;
3176
3176
return std::tie (a, b, c);
3177
3177
}
3178
3178
template <typename T>
3179
- auto UnpackStructImpl (const T& t, MakeIndexSequence <4 >, char ) {
3179
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <4 >, char ) {
3180
3180
const auto & [a, b, c, d] = t;
3181
3181
return std::tie (a, b, c, d);
3182
3182
}
3183
3183
template <typename T>
3184
- auto UnpackStructImpl (const T& t, MakeIndexSequence <5 >, char ) {
3184
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <5 >, char ) {
3185
3185
const auto & [a, b, c, d, e] = t;
3186
3186
return std::tie (a, b, c, d, e);
3187
3187
}
3188
3188
template <typename T>
3189
- auto UnpackStructImpl (const T& t, MakeIndexSequence <6 >, char ) {
3189
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <6 >, char ) {
3190
3190
const auto & [a, b, c, d, e, f] = t;
3191
3191
return std::tie (a, b, c, d, e, f);
3192
3192
}
3193
3193
template <typename T>
3194
- auto UnpackStructImpl (const T& t, MakeIndexSequence <7 >, char ) {
3194
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <7 >, char ) {
3195
3195
const auto & [a, b, c, d, e, f, g] = t;
3196
3196
return std::tie (a, b, c, d, e, f, g);
3197
3197
}
3198
3198
template <typename T>
3199
- auto UnpackStructImpl (const T& t, MakeIndexSequence <8 >, char ) {
3199
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <8 >, char ) {
3200
3200
const auto & [a, b, c, d, e, f, g, h] = t;
3201
3201
return std::tie (a, b, c, d, e, f, g, h);
3202
3202
}
3203
3203
template <typename T>
3204
- auto UnpackStructImpl (const T& t, MakeIndexSequence <9 >, char ) {
3204
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <9 >, char ) {
3205
3205
const auto & [a, b, c, d, e, f, g, h, i] = t;
3206
3206
return std::tie (a, b, c, d, e, f, g, h, i);
3207
3207
}
3208
3208
template <typename T>
3209
- auto UnpackStructImpl (const T& t, MakeIndexSequence <10 >, char ) {
3209
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <10 >, char ) {
3210
3210
const auto & [a, b, c, d, e, f, g, h, i, j] = t;
3211
3211
return std::tie (a, b, c, d, e, f, g, h, i, j);
3212
3212
}
3213
3213
template <typename T>
3214
- auto UnpackStructImpl (const T& t, MakeIndexSequence <11 >, char ) {
3214
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <11 >, char ) {
3215
3215
const auto & [a, b, c, d, e, f, g, h, i, j, k] = t;
3216
3216
return std::tie (a, b, c, d, e, f, g, h, i, j, k);
3217
3217
}
3218
3218
template <typename T>
3219
- auto UnpackStructImpl (const T& t, MakeIndexSequence <12 >, char ) {
3219
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <12 >, char ) {
3220
3220
const auto & [a, b, c, d, e, f, g, h, i, j, k, l] = t;
3221
3221
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l);
3222
3222
}
3223
3223
template <typename T>
3224
- auto UnpackStructImpl (const T& t, MakeIndexSequence <13 >, char ) {
3224
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <13 >, char ) {
3225
3225
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m] = t;
3226
3226
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m);
3227
3227
}
3228
3228
template <typename T>
3229
- auto UnpackStructImpl (const T& t, MakeIndexSequence <14 >, char ) {
3229
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <14 >, char ) {
3230
3230
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n] = t;
3231
3231
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n);
3232
3232
}
3233
3233
template <typename T>
3234
- auto UnpackStructImpl (const T& t, MakeIndexSequence <15 >, char ) {
3234
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <15 >, char ) {
3235
3235
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o] = t;
3236
3236
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
3237
3237
}
3238
3238
template <typename T>
3239
- auto UnpackStructImpl (const T& t, MakeIndexSequence <16 >, char ) {
3239
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <16 >, char ) {
3240
3240
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p] = t;
3241
3241
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
3242
3242
}
3243
3243
template <typename T>
3244
- auto UnpackStructImpl (const T& t, MakeIndexSequence <17 >, char ) {
3244
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <17 >, char ) {
3245
3245
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = t;
3246
3246
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
3247
3247
}
3248
3248
template <typename T>
3249
- auto UnpackStructImpl (const T& t, MakeIndexSequence <18 >, char ) {
3249
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <18 >, char ) {
3250
3250
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = t;
3251
3251
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
3252
3252
}
3253
3253
template <typename T>
3254
- auto UnpackStructImpl (const T& t, MakeIndexSequence <19 >, char ) {
3254
+ auto UnpackStructImpl (const T& t, std::make_index_sequence <19 >, char ) {
3255
3255
const auto & [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = t;
3256
3256
return std::tie (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
3257
3257
}
3258
3258
#endif // defined(__cpp_structured_bindings)
3259
3259
3260
3260
template <size_t I, typename T>
3261
3261
auto UnpackStruct (const T& t)
3262
- -> decltype((UnpackStructImpl)(t, MakeIndexSequence <I>{}, 0 )) {
3263
- return (UnpackStructImpl)(t, MakeIndexSequence <I>{}, 0 );
3262
+ -> decltype((UnpackStructImpl)(t, std::make_index_sequence <I>{}, 0 )) {
3263
+ return (UnpackStructImpl)(t, std::make_index_sequence <I>{}, 0 );
3264
3264
}
3265
3265
3266
3266
// Helper function to do comma folding in C++11.
@@ -3273,7 +3273,7 @@ template <typename Struct, typename StructSize>
3273
3273
class FieldsAreMatcherImpl ;
3274
3274
3275
3275
template <typename Struct, size_t ... I>
3276
- class FieldsAreMatcherImpl <Struct, IndexSequence <I...>>
3276
+ class FieldsAreMatcherImpl <Struct, std::index_sequence <I...>>
3277
3277
: public MatcherInterface<Struct> {
3278
3278
using UnpackedType =
3279
3279
decltype (UnpackStruct<sizeof ...(I)>(std::declval<const Struct&>()));
@@ -3355,8 +3355,8 @@ class FieldsAreMatcher {
3355
3355
template <typename Struct>
3356
3356
operator Matcher<Struct>() const { // NOLINT
3357
3357
return Matcher<Struct>(
3358
- new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
3359
- matchers_));
3358
+ new FieldsAreMatcherImpl<const Struct&,
3359
+ std::index_sequence_for<Inner...>>( matchers_));
3360
3360
}
3361
3361
3362
3362
private:
0 commit comments