/* * $Id$ */ /* * Copyright (c) 2016 Brook Milligan. * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #ifndef MATH_EXP_HPP #define MATH_EXP_HPP 1 #include #include #include namespace math { struct exp_ { template< typename Signature > struct result; template< typename This, typename Arg > struct result< This(Arg) > : std::decay {}; template < typename Arg > Arg operator () (Arg const& arg) const { using std::exp; return exp(arg); } }; template < typename A > typename boost::proto::result_of::make_expr< boost::proto::tag::function , typename boost::proto::domain_of::type , exp_ , A const& >::type const exp (A const& a) { return boost::proto::make_expr< boost::proto::tag::function , typename boost::proto::domain_of::type >(exp_(),boost::ref(a)); } } // namespace math #endif