1
     ˆÃÂÆ614ÁÅÄ f    ‹      Õ–]oÚ0†ïû+<_ìN ÝªµÁSG*�RÔ2MÓ4!cb5±#Û@³_¿ÂTZ�ÖiZnrbçÍ9ç±åWŽ_$×ýÉçñ%y?¹’ñÇwÃAŸÐÀ§ã>@2Iê'í¨p9¢„¦!g ëõº½>n[·€É¤!ÏNÀ§EhË );Š«9vDâTq‰‘ÄA‡L±�‘êžØ9»^K…ÿ•¤Zi¡|õT¹Ê­+·áôŒ•*Q,» ¸Hè*M7†:)–�m�xfeY•ïüéR˜qƒÁg›ŠÕ«cqHÉŠgzaz4Ø‚²Xçâ�èQÐÂ³Œ›»öBÏ)áYèÑ/ƒþõWÔAH«¿YÌIêÔ¼Gßö{£óë^BÙˆç*¾_s…šÊ†Ü’[©çZÉƒâÛZ|«¿N˜ÔšDyát´5R@Ä]Ta3_pd}…©ÛUÕù³ÕàâÑbŒ/n.G“dpS/‰¬R<t÷{GÙ˜;eI´S" jVWyif¾8ÿ1$Û¶�^¤�2BZd¯òX—æÎØµÙÅÅ¥Ü*lª°UQN3mÔÔã~Q¶gràIÇÝ¨ûºÕé´º‰¢3|’B<Ìþ!šF7Ð²��gj¥2Ê6¡�í›e>SnjçS¯‚§ìñ¸�@EZz-xVŸ†‚;ô~4+Ê|h ¢OÑ°ä=Y<Ö2Ñl¤œ�ˆpü ÎÒ9=‹Nÿ �77ÔŒCY`óÕ³�Í/Ñ‰–­cÖ¼ô•sï­Ð<è•%e{§ÿ>Þ3¯u°½ðÆ°¹YÇP_ì¿óìF;    B   ˆl–Ãa¾”êh¥2 ¸&®6â˜´o�þJ9VnRÉÜcüÿÈƒeÖßÇ_‹I|¥�+ýÿ¹ä³ÇÆ ¯    /*!
@file
Defines `boost::hana::plus`.

@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
 */

#ifndef BOOST_HANA_PLUS_HPP
#define BOOST_HANA_PLUS_HPP

#include <boost/hana/fwd/plus.hpp>

#include <boost/hana/concept/constant.hpp>
#include <boost/hana/concept/monoid.hpp>
#include <boost/hana/config.hpp>
#include <boost/hana/core/common.hpp>
#include <boost/hana/core/to.hpp>
#include <boost/hana/core/dispatch.hpp>
#include <boost/hana/detail/canonical_constant.hpp>
#include <boost/hana/detail/has_common_embedding.hpp>

#include <type_traits>


BOOST_HANA_NAMESPACE_BEGIN
    //! @cond
    template <typename X, typename Y>
    constexpr decltype(auto) plus_t::operator()(X&& x, Y&& y) const {
        using T = typename hana::tag_of<X>::type;
        using U = typename hana::tag_of<Y>::type;
        using Plus = BOOST_HANA_DISPATCH_IF(decltype(plus_impl<T, U>{}),
            hana::Monoid<T>::value &&
            hana::Monoid<U>::value &&
            !is_default<plus_impl<T, U>>::value
        );

    #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS
        static_assert(hana::Monoid<T>::value,
        "hana::plus(x, y) requires 'x' to be a Monoid");

        static_assert(hana::Monoid<U>::value,
        "hana::plus(x, y) requires 'y' to be a Monoid");

        static_assert(!is_default<plus_impl<T, U>>::value,
        "hana::plus(x, y) requires 'x' and 'y' to be embeddable "
        "in a common Monoid");
    #endif

        return Plus::apply(static_cast<X&&>(x), static_cast<Y&&>(y));
    }
    //! @endcond

    template <typename T, typename U, bool condition>
    struct plus_impl<T, U, when<condition>> : default_ {
        template <typename ...Args>
        static constexpr auto apply(Args&& ...) = delete;
    };

    // Cross-type overload
    template <typename T, typename U>
    struct plus_impl<T, U, when<
        detail::has_nontrivial_common_embedding<Monoid, T, U>::value
    >> {
        using C = typename common<T, U>::type;
        template <typename X, typename Y>
        static constexpr decltype(auto) apply(X&& x, Y&& y) {
            return hana::plus(hana::to<C>(static_cast<X&&>(x)),
                              hana::to<C>(static_cast<Y&&>(y)));
        }
    };

    //////////////////////////////////////////////////////////////////////////
    // Model for non-boolean arithmetic data types
    //////////////////////////////////////////////////////////////////////////
    template <typename T>
    struct plus_impl<T, T, when<
        std::is_arithmetic<T>::value &&
        !std::is_same<T, bool>::value
    >> {
        template <typename X, typename Y>
        static constexpr decltype(auto) apply(X&& x, Y&& y)
        { return static_cast<X&&>(x) + static_cast<Y&&>(y); }
    };

    //////////////////////////////////////////////////////////////////////////
    // Model for Constants over a Monoid
    //////////////////////////////////////////////////////////////////////////
    namespace detail {
        template <typename C, typename X, typename Y>
        struct constant_from_plus {
            static constexpr auto value = hana::plus(hana::value<X>(), hana::value<Y>());
            using hana_tag = detail::CanonicalConstant<typename C::value_type>;
        };
    }
