3 Forward declares `boost::hana::or_`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_OR_HPP
11 #define BOOST_HANA_FWD_OR_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Return whether any of the arguments is true-valued.
19 //! @ingroup group-Logical
21 //! `or_` can be called with one argument or more. When called with
22 //! two arguments, `or_` uses tag-dispatching to find the right
23 //! implementation. Otherwise,
26 //! or_(x, y, ...z) == or_(or_(x, y), z...)
32 //! @include example/or.cpp
33 #ifdef BOOST_HANA_DOXYGEN_INVOKED
34 constexpr auto or_ = [](auto&& x, auto&& ...y) -> decltype(auto) {
35 return tag-dispatched;
38 template <typename L, typename = void>
39 struct or_impl : or_impl<L, when<true>> { };
42 template <typename X, typename Y>
43 constexpr decltype(auto) operator()(X&& x, Y&& y) const;
45 template <typename X, typename ...Y>
46 constexpr decltype(auto) operator()(X&& x, Y&& ...y) const;
51 BOOST_HANA_NAMESPACE_END
53 #endif // !BOOST_HANA_FWD_OR_HPP