// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #pragma once #include namespace Utils { namespace Internal { template constexpr std::array, size> to_array_implementation( Type (&&array)[size], std::index_sequence) { return {{std::move(array[index])...}}; } } // namespace Internal template constexpr std::array, size> to_array(Type (&&array)[size]) { return Internal::to_array_implementation(std::move(array), std::make_index_sequence{}); } } // namespace Utils