// This file is part of the mcl project. // Copyright (c) 2022 merryhime // SPDX-License-Identifier: MIT #pragma once #include "mcl/mp/metavalue/logic_if.hpp" #include "mcl/mp/metavalue/value.hpp" namespace mcl::mp { namespace detail { template struct disjunction_impl; template<> struct disjunction_impl<> { using type = false_type; }; template struct disjunction_impl { using type = V; }; template struct disjunction_impl { using type = logic_if::type>; }; } // namespace detail /// Disjunction of metavalues Vs with short-circuiting and type preservation. template using disjunction = typename detail::disjunction_impl::type; /// Disjunction of metavalues Vs with short-circuiting and type preservation. template constexpr auto disjunction_v = disjunction::value; } // namespace mcl::mp