// This file is part of Bertini 2. // // is_template_parameter.hpp is free software: you can redistribute it and/or // modify it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or //(at your option) any later version. // // is_template_parameter.hpp is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with is_template_parameter.hpp. If not, see // . // // Copyright(C) 2015 - 2021 by Bertini2 Development Team // // See for a copy of the license, // as well as COPYING. Bertini2 is provided with permitted // additional terms in the b2/licenses/ directory. // individual authors of this file include: // silviana amethyst, university of wisconsin-eau claire // // detail/is_template_parameter.hpp /** \file detail/is_template_parameter.hpp \brief Contains the detail/is_template_parameter helper, for checking whether a type is a template parameter in a variable template */ #pragma once #include "detail/typelist.hpp" namespace bertini { namespace detail { /** Base template, which says 'no', it's not in the pack. */ template struct IsTemplateParameter { static constexpr bool value = false; }; /** Specialized template, which says 'yes', if it is in the pack, by recursively expanding the pack. */ template struct IsTemplateParameter { static constexpr bool value = std::is_same::value || IsTemplateParameter::value; // either it is the same as the first one in the pack, or we need to expand to // the right in the pack. }; template struct IsTemplateParameter> { static constexpr bool value = IsTemplateParameter::value; }; } // namespace detail } // namespace bertini