// 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 conjunction_impl; template<> struct conjunction_impl<> { using type = false_type; }; template struct conjunction_impl { using type = V; }; template struct conjunction_impl { using type = logic_if::type, V1>; }; } // namespace detail /// Conjunction of metavalues Vs with short-circuiting and type preservation. template using conjunction = typename detail::conjunction_impl::type; /// Conjunction of metavalues Vs with short-circuiting and type preservation. template constexpr auto conjunction_v = conjunction::value; } // namespace mcl::mp