diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2018-01-04 18:53:45 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2018-01-08 22:58:20 +0200 |
commit | d00e56ada0da13d9f9c99b614f915a8ac81236ca (patch) | |
tree | 63d51a4c1602a707e509b8f40245c5e92a5c8064 /include/mbgl/util/indexed_tuple.hpp | |
parent | 5786286f9cb173eaf65dd677e3fadfb181ba3825 (diff) | |
download | qtlocation-mapboxgl-d00e56ada0da13d9f9c99b614f915a8ac81236ca.tar.gz |
[windows][core] Add std::tuple replacement for Windows
Windows STL + Clang can't build our IndexedTuple class.
Diffstat (limited to 'include/mbgl/util/indexed_tuple.hpp')
-rw-r--r-- | include/mbgl/util/indexed_tuple.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mbgl/util/indexed_tuple.hpp b/include/mbgl/util/indexed_tuple.hpp index fd0b931d36..ea4fe74624 100644 --- a/include/mbgl/util/indexed_tuple.hpp +++ b/include/mbgl/util/indexed_tuple.hpp @@ -1,9 +1,9 @@ #pragma once #include <mbgl/util/type_list.hpp> +#include <mbgl/util/tuple.hpp> #include <type_traits> -#include <tuple> namespace mbgl { @@ -24,20 +24,20 @@ template <class...> class IndexedTuple; // for motivation. // template <class... Is, class... Ts> -class IndexedTuple<TypeList<Is...>, TypeList<Ts...>> : public std::tuple<Ts...> { +class IndexedTuple<TypeList<Is...>, TypeList<Ts...>> : public tuple_polyfill<Ts...> { public: static_assert(sizeof...(Is) == sizeof...(Ts), "IndexedTuple size mismatch"); - using std::tuple<Ts...>::tuple; + using tuple_polyfill<Ts...>::tuple; template <class I> auto& get() { - return std::get<TypeIndex<I, Is...>::value>(*this); + return get_polyfill<TypeIndex<I, Is...>::value>(*this); } template <class I> const auto& get() const { - return std::get<TypeIndex<I, Is...>::value>(*this); + return get_polyfill<TypeIndex<I, Is...>::value>(*this); } template <class... Js, class... Us> |