summaryrefslogtreecommitdiff
path: root/deps/tao_tuple/28626e99/include/tao/seq/minus.hpp
blob: 087443b58f853189602764ab49665c4a124dc51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// The Art of C++ / Sequences
// Copyright (c) 2015 Daniel Frey

#ifndef TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP
#define TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP

#include <type_traits>

#include "zip.hpp"

namespace tao
{
  namespace seq
  {
    namespace impl
    {
      template< typename T, T A, T B >
      using minus = std::integral_constant< T, A - B >;
    }

    template< typename A, typename B >
    using minus = zip< impl::minus, A, B >;

    template< typename A, typename B >
    using minus_t = typename minus< A, B >::type;
  }
}

#endif // TAOCPP_SEQUENCES_INCLUDE_MINUS_HPP