/* Copyright (C) 2021 * swift Project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated, * or distributed except according to the terms contained in the LICENSE file. */ //! \file #ifndef BLACKMISC_TUPLE_H #define BLACKMISC_TUPLE_H #include #include //! \cond namespace BlackMisc::Private { /* * Own minimal implementation of std::tuple with very limited functionality. * Only used to reduce compile time for the metaclass system. */ template struct tuple_part { T value; }; template struct tuple_impl; template struct tuple_impl, Ts...> : public tuple_part... { template void for_each(F &&visitor) const { (static_cast(visitor(static_cast&>(*this).value)), ...); } }; template struct tuple : public tuple_impl, Ts...> {}; } //! \endcond #endif