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