diff options
Diffstat (limited to 'deps/tao_tuple/28626e99/include/tao/seq/head.hpp')
-rw-r--r-- | deps/tao_tuple/28626e99/include/tao/seq/head.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/deps/tao_tuple/28626e99/include/tao/seq/head.hpp b/deps/tao_tuple/28626e99/include/tao/seq/head.hpp new file mode 100644 index 0000000000..fcfecf0744 --- /dev/null +++ b/deps/tao_tuple/28626e99/include/tao/seq/head.hpp @@ -0,0 +1,30 @@ +// The Art of C++ / Sequences +// Copyright (c) 2015 Daniel Frey + +#ifndef TAOCPP_SEQUENCES_INCLUDE_HEAD_HPP +#define TAOCPP_SEQUENCES_INCLUDE_HEAD_HPP + +#include <type_traits> + +#include "integer_sequence.hpp" + +namespace tao +{ + namespace seq + { + template< typename T, T... Ns > + struct head; + + template< typename T, T N, T... Ns > + struct head< T, N, Ns... > + : std::integral_constant< T, N > + {}; + + template< typename T, T... Ns > + struct head< integer_sequence< T, Ns... > > + : head< T, Ns... > + {}; + } +} + +#endif // TAOCPP_SEQUENCES_INCLUDE_HEAD_HPP |