Template Function Pennylane::Util::array_contains

Function Documentation

template<typename Key, typename Value, std::size_t size>
constexpr auto Pennylane::Util::array_contains(const std::array<std::pair<Key, Value>, size> &arr, const Value &value) -> bool

Check an array of pairs contains a certain value.

Template Parameters
  • Key – Type of keys

  • Value – Type of values

  • size – Size of std::array

Parameters
  • arr – Array to lookup

  • value – Value to find