Template Function Pennylane::Util::array_has_elem

Function Documentation

template<typename U, std::size_t size>
constexpr auto Pennylane::Util::array_has_elem(const std::array<U, size> &arr, const U &elem) -> bool

Check an array has an element.

Template Parameters
  • U – Type of array elements.

  • size – Size of array.

Parameters
  • arr – Array to check.

  • elem – Element to find.