summaryrefslogtreecommitdiff
path: root/deps/tao_tuple/28626e99/include/tao/seq/is_any.hpp
blob: 36c39f66aa548d4ce7cc5399085f48d40a18e7a4 (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
30
31
32
33
34
35
// The Art of C++ / Sequences
// Copyright (c) 2015 Daniel Frey

#ifndef TAOCPP_SEQUENCES_INCLUDE_IS_ANY_HPP
#define TAOCPP_SEQUENCES_INCLUDE_IS_ANY_HPP

#include "config.hpp"

#ifndef TAOCPP_FOLD_EXPRESSIONS
#include "is_all.hpp"
#endif

#include <type_traits>

namespace tao
{
  namespace seq
  {

#ifdef TAOCPP_FOLD_EXPRESSIONS

    template< bool... Bs >
    using is_any = std::integral_constant< bool, ( Bs || ... ) >;

#else

    template< bool... Bs >
    using is_any = std::integral_constant< bool, !is_all< !Bs... >::value >;

#endif

  }
}

#endif // TAOCPP_SEQUENCES_INCLUDE_IS_ANY_HPP