CMS 3D CMS Logo

mplVector.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_mplVector_h
2 #define FWCore_Utilities_mplVector_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Utilities
6 // Class : edm::mpl::Vector
7 //
37 //
38 // Original Author: Chris Jones
39 // Created: Tues, 21 Jul 2020 14:29:51 GMT
40 //
41 
42 // system include files
43 #include <type_traits>
44 
45 // user include files
46 
47 // forward declarations
48 
49 namespace edm {
50  namespace mpl {
51  template <typename... T>
52  class Vector {
53  public:
55  template <typename U>
56  static constexpr bool contains() {
57  return (std::is_same_v<U, T> || ...);
58  }
59  };
60 
61  template <typename T>
62  struct Pop;
63 
64  template <typename F, typename... T>
65  struct Pop<Vector<F, T...>> {
66  constexpr static bool empty = false;
67  using Item = F;
68  using Remaining = Vector<T...>;
69  };
70 
71  template <>
72  struct Pop<Vector<>> {
73  constexpr static bool empty = true;
74  using Item = void;
76  };
77 
78  template <typename T, typename U>
79  struct Push;
80 
81  template <typename T, typename... U>
82  struct Push<T, Vector<U...>> {
83  constexpr static bool empty = false;
84  using Result = Vector<T, U...>;
85  };
86  } // namespace mpl
87 } // namespace edm
88 
89 #endif
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
HLT enums.
static constexpr bool contains()
Returns true if the type U is within the collection.
Definition: mplVector.h:56
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
long double T