mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix index_tuple implementation: template aliases (if compiler supported)
This commit is contained in:
parent
bb36ef6e8b
commit
3ff1ffb4d9
8 changed files with 78 additions and 21 deletions
|
@ -31,6 +31,7 @@ namespace std {
|
|||
typedef typename sprout::tppack_c_at<I, T, Is...>::type type;
|
||||
};
|
||||
|
||||
#if !SPROUT_USE_TEMPLATE_ALIASES
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -60,6 +61,8 @@ namespace std {
|
|||
struct tuple_element<I, sprout::uindex_tuple<Indexes...> >
|
||||
: public std::tuple_element<I, sprout::integer_sequence<sprout::uindex_t, Indexes...> >
|
||||
{};
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
@ -77,6 +80,7 @@ namespace sprout {
|
|||
return type();
|
||||
}
|
||||
|
||||
#if !SPROUT_USE_TEMPLATE_ALIASES
|
||||
//
|
||||
// tuple_get
|
||||
//
|
||||
|
@ -98,6 +102,7 @@ namespace sprout {
|
|||
typedef typename std::tuple_element<I, sprout::uindex_tuple<Indexes...> >::type type;
|
||||
return type();
|
||||
}
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_INDEX_TUPLE_TUPLE_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue