1 #pragma once
2 
3 #include <initializer_list>
4 
5 namespace mbgl {
6 namespace util {
7 
8 // Accept any number of parameters of any types, and do nothing with them.
9 // Useful for providing a context for parameter pack expansion where a legal
10 // expansion context is not otherwise available.
11 //
12 // See https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md
13 // for more details.
14 //
ignore(Ts &&...)15 template <class... Ts> void ignore(Ts&&...) {}
16 
17 // std::initializer_list overload, for situations where you need sequenced
18 // modifications.
19 //
ignore(const std::initializer_list<T> &)20 template <class T> void ignore(const std::initializer_list<T>&) {}
21 
22 // Handle the zero-argument case.
ignore(const std::initializer_list<int> &)23 inline void ignore(const std::initializer_list<int>&) {}
24 
25 } // namespace util
26 } // namespace mbgl
27