// Copyright (c) 2016-2023 Antony Polukhin // // 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 BHO_PFR_TUPLE_SIZE_HPP #define BHO_PFR_TUPLE_SIZE_HPP #pragma once #include #include #include // metaprogramming stuff #include #include /// \file bho/pfr/tuple_size.hpp /// Contains tuple-like interfaces to get fields count \forcedlink{tuple_size}, \forcedlink{tuple_size_v}. /// /// \b Synopsis: namespace bho { namespace pfr { /// Has a static const member variable `value` that contains fields count in a T. /// Works for any T that satisfies \aggregate. /// /// \b Example: /// \code /// std::array::value > a; /// \endcode template using tuple_size = detail::size_t_< bho::pfr::detail::fields_count() >; /// `tuple_size_v` is a template variable that contains fields count in a T and /// works for any T that satisfies \aggregate. /// /// \b Example: /// \code /// std::array > a; /// \endcode template constexpr std::size_t tuple_size_v = tuple_size::value; }} // namespace bho::pfr #endif // BHO_PFR_TUPLE_SIZE_HPP