// Copyright (c) 2023 Denis Mikhailov // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PFR_DETAIL_STDARRAY_HPP #define BOOST_PFR_DETAIL_STDARRAY_HPP #pragma once #include #include // metaprogramming stuff #include #include // for std::common_type_t #include #include namespace boost { namespace pfr { namespace detail { template constexpr auto make_stdarray(const Types&... t) noexcept { return std::array, sizeof...(Types)>{t...}; } template constexpr auto make_stdarray_from_tietuple(const T& t, std::index_sequence, int) noexcept { return detail::make_stdarray( boost::pfr::detail::sequence_tuple::get(t)... ); } template constexpr auto make_stdarray_from_tietuple(const T&, std::index_sequence<>, long) noexcept { return std::array{}; } }}} // namespace boost::pfr::detail #endif // BOOST_PFR_DETAIL_STDARRAY_HPP