// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include namespace rocRoller { /** * Array which uses an enum (class) as an indexer. Has the interface of std::array, and can be * indexed by the enum. * * The enum must declare a Count entry. */ template class EnumArray : public std::array(Enum::Count)> { public: static constexpr size_t Size = static_cast(Enum::Count); using Base = std::array; using Base::Base; using Base::operator[]; using Base::at; constexpr T& operator[](Enum val); constexpr T const& operator[](Enum val) const; constexpr T& at(Enum val); constexpr T const& at(Enum val) const; }; } #include