6#include <initializer_list>
22template <
typename T, std::
size_t N>
class RefArray {
37 template <
typename... Ts>
47#if !defined(__clang__) && defined(__GNUC__)
48#pragma GCC diagnostic push
49#pragma GCC diagnostic ignored "-Warray-bounds"
53#if !defined(__clang__) && defined(__GNUC__)
54#pragma GCC diagnostic pop
66 for (
size_t idx = 0; idx < N; idx++) {
144template <
typename T,
typename... Ts>
RefArray(T&, Ts&...) ->
RefArray<T, 1 +
sizeof...(Ts)>;
167 for (
std::size_t i = 0; i < ref_array.size(); ++i) {
170 offset += ref_array.size();
174 (..., copy_into(ref_arrays,
offset));
#define BB_ASSERT_LT(left, right,...)
Nested iterator class for RefArray, based on indexing into the pointer array. Provides semantics simi...
bool operator==(iterator const &other) const
iterator(RefArray const *array, std::size_t pos)
Constructs an iterator for a given RefArray object.
bool operator!=(iterator const &other) const
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
T *const * get_storage() const
iterator end() const
Returns an iterator to the end of the RefArray.
iterator begin() const
Returns an iterator to the beginning of the RefArray.
RefArray(const std::array< T *, N > &ptr_array)
RefArray(std::array< T, N > &arr)
std::array< T, N > get_copy()
Get a copy of the underlying data. Use carefully, as it allocates new data for the data pointed to by...
RefArray(T &first, Ts &... refs)
constexpr std::size_t size() const
T & operator[](std::size_t idx) const
const std::vector< FF > data
Entry point for Barretenberg command-line interface.
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept