diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/phoenix/stl/cmath.hpp | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/phoenix/stl/cmath.hpp')
-rw-r--r-- | boost/phoenix/stl/cmath.hpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/boost/phoenix/stl/cmath.hpp b/boost/phoenix/stl/cmath.hpp index 488ac2caed..b7e72e583c 100644 --- a/boost/phoenix/stl/cmath.hpp +++ b/boost/phoenix/stl/cmath.hpp @@ -16,6 +16,7 @@ namespace boost { +#ifdef BOOST_NO_CXX11_DECLTYPE #define BOOST_PHOENIX_MATH_FUNCTION(name, n) \ namespace phoenix_impl { \ struct name ## _impl { \ @@ -36,8 +37,32 @@ namespace boost { }; \ } \ namespace phoenix { \ - BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, 1) \ + BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \ } +#else +#define BOOST_PHOENIX_MATH_FUNCTION(name, n) \ + namespace phoenix_impl { \ + struct name ## _impl { \ + template<class Sig> \ + struct result; \ + template<class This, BOOST_PHOENIX_typename_A(n)> \ + struct result<This(BOOST_PHOENIX_A(n))> \ + { \ + typedef \ + decltype( name(typename proto::detail::uncvref<A0>::type()) ) \ + type; \ + }; \ + template<BOOST_PHOENIX_typename_A(n)> \ + auto operator()(BOOST_PHOENIX_A_const_ref_a(n)) const -> decltype( name(BOOST_PHOENIX_a(n)) ) { \ + using namespace std; \ + return name(BOOST_PHOENIX_a(n)); \ + } \ + }; \ + } \ + namespace phoenix { \ + BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \ + } +#endif BOOST_PHOENIX_MATH_FUNCTION(acos, 1) BOOST_PHOENIX_MATH_FUNCTION(asin, 1) |