3 Forward declares `boost::hana::zero`.
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_ZERO_HPP
11 #define BOOST_HANA_FWD_ZERO_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Identity of `plus`.
19 //! @ingroup group-Monoid
22 //! The tag (a `Monoid`) of the returned identity.
27 //! @include example/zero.cpp
28 #ifdef BOOST_HANA_DOXYGEN_INVOKED
30 constexpr auto zero = []() -> decltype(auto) {
31 return tag-dispatched;
34 template <typename M, typename = void>
35 struct zero_impl : zero_impl<M, when<true>> { };
41 constexpr zero_t<M> zero{};
43 BOOST_HANA_NAMESPACE_END
45 #endif // !BOOST_HANA_FWD_ZERO_HPP