Skip to content

Commit

Permalink
Simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Oct 17, 2015
1 parent 862574b commit 7a551ce
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions include/tao/seq/type_by_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ namespace tao
using type = T;
};

template< typename T >
using unwrap_t = typename unwrap< T >::type;

template< typename >
struct get_nth;

Expand All @@ -50,13 +47,10 @@ namespace tao
}

template< std::size_t I, typename... Ts >
using type_by_index_t = impl::unwrap_t< decltype( impl::get_nth< make_index_sequence< I > >::deduce( std::declval< impl::wrapper< Ts >* >()... ) ) >;
using type_by_index = impl::unwrap< decltype( impl::get_nth< make_index_sequence< I > >::deduce( std::declval< impl::wrapper< Ts >* >()... ) ) >;

template< std::size_t I, typename... Ts >
struct type_by_index
{
using type = type_by_index_t< I, Ts... >;
};
using type_by_index_t = typename type_by_index< I, Ts... >::type;
}
}

Expand Down

0 comments on commit 7a551ce

Please sign in to comment.