1 // The Art of C++ / Sequences
2 // Copyright (c) 2015 Daniel Frey
3 
4 #ifndef TAOCPP_SEQUENCES_INCLUDE_TAIL_HPP
5 #define TAOCPP_SEQUENCES_INCLUDE_TAIL_HPP
6 
7 #include <type_traits>
8 
9 #include "integer_sequence.hpp"
10 
11 namespace tao
12 {
13   namespace seq
14   {
15     template< typename T, T... Ns >
16     struct tail;
17 
18     template< typename T, T N, T... Ns >
19     struct tail< T, N, Ns... >
20     {
21       using type = integer_sequence< T, Ns... >;
22     };
23 
24     template< typename T, T... Ns >
25     struct tail< integer_sequence< T, Ns... > >
26       : tail< T, Ns... >
27     {};
28 
29     template< typename T, T... Ns >
30     using tail_t = typename tail< T, Ns... >::type;
31   }
32 }
33 
34 #endif // TAOCPP_SEQUENCES_INCLUDE_TAIL_HPP
35