/* * Copyright 2024 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkTFixedArray_DEFINED #define SkTFixedArray_DEFINED #include "include/private/base/SkAssert.h" #include <cstdint> #include <cstring> #include <initializer_list> #include <type_traits> // IWYU pragma: keep for std::is_trivial_v namespace skia_private { /** * Represents an array of `T` (must be a trivial type) that cannot grow past a fixed size `N`. * The fixed-size restriction allows for tighter codegen and a smaller memory footprint. * Missing methods from TArray (e.g. `fromBack`) can be added on demand. * * The trivial-type restriction is only to simplify implementation; if there is a need, we can * adopt proper move/copy semantics in this class as well. */ template <int N, typename T> class FixedArray { … }; } // namespace skia_private #endif