1 // The Art of C++ / Sequences
2 // Copyright (c) 2015 Daniel Frey
3 
4 #ifndef TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP
5 #define TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP
6 
7 #include <type_traits>
8 
9 #include "zip.hpp"
10 
11 namespace tao
12 {
13   namespace seq
14   {
15     namespace impl
16     {
17       template< typename T, T A, T B >
18       using minus = std::integral_constant< T, A - B >;
19     }
20 
21     template< typename A, typename B >
22     using minus = zip< impl::minus, A, B >;
23 
24     template< typename A, typename B >
25     using minus_t = typename minus< A, B >::type;
26   }
27 }
28 
29 #endif // TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP
30