annotate DEPENDENCIES/generic/include/boost/phoenix/stl/cmath.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*==============================================================================
Chris@16 2 Copyright (c) 2011 Steven Watanabe
Chris@16 3
Chris@16 4 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 6 ==============================================================================*/
Chris@16 7
Chris@16 8 #ifndef BOOST_PHOENIX_CMATH_HPP_INCLUDED
Chris@16 9 #define BOOST_PHOENIX_CMATH_HPP_INCLUDED
Chris@16 10
Chris@16 11 #include <boost/phoenix/core/limits.hpp>
Chris@16 12 #include <cmath>
Chris@16 13 #include <boost/phoenix/function/adapt_callable.hpp>
Chris@16 14 #include <boost/type_traits/remove_reference.hpp>
Chris@16 15 #include <boost/type_traits/remove_cv.hpp>
Chris@16 16
Chris@16 17 namespace boost {
Chris@16 18
Chris@101 19 #if (defined (BOOST_NO_CXX11_DECLTYPE) || \
Chris@101 20 defined (BOOST_INTEL_CXX_VERSION) || \
Chris@101 21 (BOOST_GCC_VERSION < 40500) )
Chris@16 22 #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \
Chris@16 23 namespace phoenix_impl { \
Chris@16 24 struct name ## _impl { \
Chris@16 25 template<class Sig> \
Chris@16 26 struct result; \
Chris@16 27 template<class This, BOOST_PHOENIX_typename_A(n)> \
Chris@16 28 struct result<This(BOOST_PHOENIX_A(n))> \
Chris@16 29 { \
Chris@16 30 typedef \
Chris@16 31 typename proto::detail::uncvref<A0>::type \
Chris@16 32 type; \
Chris@16 33 }; \
Chris@16 34 template<BOOST_PHOENIX_typename_A(n)> \
Chris@16 35 A0 operator()(BOOST_PHOENIX_A_const_ref_a(n)) const { \
Chris@16 36 using namespace std; \
Chris@16 37 return name(BOOST_PHOENIX_a(n)); \
Chris@16 38 } \
Chris@16 39 }; \
Chris@16 40 } \
Chris@16 41 namespace phoenix { \
Chris@101 42 BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \
Chris@16 43 }
Chris@101 44 #else
Chris@101 45 #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \
Chris@101 46 namespace phoenix_impl { \
Chris@101 47 struct name ## _impl { \
Chris@101 48 template<class Sig> \
Chris@101 49 struct result; \
Chris@101 50 template<class This, BOOST_PHOENIX_typename_A(n)> \
Chris@101 51 struct result<This(BOOST_PHOENIX_A(n))> \
Chris@101 52 { \
Chris@101 53 typedef \
Chris@101 54 decltype( name(typename proto::detail::uncvref<A0>::type()) ) \
Chris@101 55 type; \
Chris@101 56 }; \
Chris@101 57 template<BOOST_PHOENIX_typename_A(n)> \
Chris@101 58 auto operator()(BOOST_PHOENIX_A_const_ref_a(n)) const -> decltype( name(BOOST_PHOENIX_a(n)) ) { \
Chris@101 59 using namespace std; \
Chris@101 60 return name(BOOST_PHOENIX_a(n)); \
Chris@101 61 } \
Chris@101 62 }; \
Chris@101 63 } \
Chris@101 64 namespace phoenix { \
Chris@101 65 BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \
Chris@101 66 }
Chris@101 67 #endif
Chris@16 68
Chris@16 69 BOOST_PHOENIX_MATH_FUNCTION(acos, 1)
Chris@16 70 BOOST_PHOENIX_MATH_FUNCTION(asin, 1)
Chris@16 71 BOOST_PHOENIX_MATH_FUNCTION(atan, 1)
Chris@16 72 BOOST_PHOENIX_MATH_FUNCTION(atan2, 2)
Chris@16 73 BOOST_PHOENIX_MATH_FUNCTION(ceil, 1)
Chris@16 74 BOOST_PHOENIX_MATH_FUNCTION(cos, 1)
Chris@16 75 BOOST_PHOENIX_MATH_FUNCTION(cosh, 1)
Chris@16 76 BOOST_PHOENIX_MATH_FUNCTION(exp, 1)
Chris@16 77 BOOST_PHOENIX_MATH_FUNCTION(fabs, 1)
Chris@16 78 BOOST_PHOENIX_MATH_FUNCTION(floor, 1)
Chris@16 79 BOOST_PHOENIX_MATH_FUNCTION(fmod, 2)
Chris@16 80 BOOST_PHOENIX_MATH_FUNCTION(frexp, 2)
Chris@16 81 BOOST_PHOENIX_MATH_FUNCTION(ldexp, 2)
Chris@16 82 BOOST_PHOENIX_MATH_FUNCTION(log, 1)
Chris@16 83 BOOST_PHOENIX_MATH_FUNCTION(log10, 1)
Chris@16 84 BOOST_PHOENIX_MATH_FUNCTION(modf, 2)
Chris@16 85 BOOST_PHOENIX_MATH_FUNCTION(pow, 2)
Chris@16 86 BOOST_PHOENIX_MATH_FUNCTION(sin, 1)
Chris@16 87 BOOST_PHOENIX_MATH_FUNCTION(sinh, 1)
Chris@16 88 BOOST_PHOENIX_MATH_FUNCTION(sqrt, 1)
Chris@16 89 BOOST_PHOENIX_MATH_FUNCTION(tan, 1)
Chris@16 90 BOOST_PHOENIX_MATH_FUNCTION(tanh, 1)
Chris@16 91
Chris@16 92 #undef BOOST_PHOENIX_MATH_FUNCTION
Chris@16 93
Chris@16 94 }
Chris@16 95
Chris@16 96 #endif