diff options
Diffstat (limited to 'boost/units/cmath.hpp')
-rw-r--r-- | boost/units/cmath.hpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/boost/units/cmath.hpp b/boost/units/cmath.hpp index 238b31c3d3..da3da46f46 100644 --- a/boost/units/cmath.hpp +++ b/boost/units/cmath.hpp @@ -47,6 +47,7 @@ namespace units { template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -56,6 +57,7 @@ isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -65,6 +67,7 @@ isinf BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -74,6 +77,7 @@ isnan BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -83,6 +87,7 @@ isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -93,6 +98,7 @@ isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -103,6 +109,7 @@ isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isless BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -113,6 +120,7 @@ isless BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR bool islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -123,6 +131,7 @@ islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR bool islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -133,6 +142,7 @@ islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR bool isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -143,6 +153,7 @@ isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> abs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -155,6 +166,7 @@ abs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> ceil BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -167,6 +179,7 @@ ceil BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> copysign BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -180,6 +193,7 @@ copysign BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> fabs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -192,6 +206,7 @@ fabs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> floor BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -204,6 +219,7 @@ floor BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> fdim BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -219,6 +235,7 @@ fdim BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit1,class Unit2,class Unit3,class Y> inline +BOOST_CONSTEXPR typename add_typeof_helper< typename multiply_typeof_helper<quantity<Unit1,Y>, quantity<Unit2,Y> >::type, @@ -243,6 +260,7 @@ fma BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit1,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> fmax BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -256,6 +274,7 @@ fmax BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> fmin BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) @@ -269,6 +288,7 @@ fmin BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, template<class Unit,class Y> inline +BOOST_CONSTEXPR int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -279,6 +299,7 @@ fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR typename root_typeof_helper< typename add_typeof_helper< typename power_typeof_helper<quantity<Unit,Y>, @@ -302,6 +323,7 @@ hypot BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,const quantit // does ISO C++ support long long? g++ claims not //template<class Unit,class Y> //inline +//BOOST_CONSTEXPR //quantity<Unit,long long> //llrint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) //{ @@ -315,6 +337,7 @@ hypot BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,const quantit // does ISO C++ support long long? g++ claims not //template<class Unit,class Y> //inline +//BOOST_CONSTEXPR //quantity<Unit,long long> //llround BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) //{ @@ -329,6 +352,7 @@ hypot BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,const quantit template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -343,6 +367,7 @@ nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) { @@ -354,6 +379,7 @@ quantity<Unit,Y> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit } template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) { @@ -371,6 +397,7 @@ quantity<Unit,Y> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Uni template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> rint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -385,6 +412,7 @@ rint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> round BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -397,6 +425,7 @@ round BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR int signbit BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -407,6 +436,7 @@ signbit BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit,Y> trunc BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) { @@ -419,6 +449,7 @@ trunc BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR quantity<Unit, Y> fmod(const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) { @@ -431,6 +462,7 @@ fmod(const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2) template<class Unit, class Y> inline +BOOST_CONSTEXPR quantity<Unit, Y> modf(const quantity<Unit, Y>& q1, quantity<Unit, Y>* q2) { @@ -443,6 +475,7 @@ modf(const quantity<Unit, Y>& q1, quantity<Unit, Y>* q2) template<class Unit, class Y, class Int> inline +BOOST_CONSTEXPR quantity<Unit, Y> frexp(const quantity<Unit, Y>& q,Int* ex) { @@ -457,6 +490,7 @@ frexp(const quantity<Unit, Y>& q,Int* ex) /// and roots can be computed by @c pow<Ex> and @c root<Rt> respectively. template<class S, class Y> inline +BOOST_CONSTEXPR quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> pow(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q1, const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q2) @@ -470,6 +504,7 @@ pow(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q1, template<class S, class Y> inline +BOOST_CONSTEXPR quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> exp(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) { @@ -482,6 +517,7 @@ exp(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) template<class Unit, class Y, class Int> inline +BOOST_CONSTEXPR quantity<Unit, Y> ldexp(const quantity<Unit, Y>& q,const Int& ex) { @@ -494,6 +530,7 @@ ldexp(const quantity<Unit, Y>& q,const Int& ex) template<class S, class Y> inline +BOOST_CONSTEXPR quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> log(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) { @@ -506,6 +543,7 @@ log(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) template<class S, class Y> inline +BOOST_CONSTEXPR quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> log10(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) { @@ -518,6 +556,7 @@ log10(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q) template<class Unit,class Y> inline +BOOST_CONSTEXPR typename root_typeof_helper< quantity<Unit,Y>, static_rational<2> @@ -546,6 +585,7 @@ namespace units { /// cos of theta in radians template<class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<si::system,Y>::type cos(const quantity<si::plane_angle,Y>& theta) { @@ -555,6 +595,7 @@ cos(const quantity<si::plane_angle,Y>& theta) /// sin of theta in radians template<class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<si::system,Y>::type sin(const quantity<si::plane_angle,Y>& theta) { @@ -564,6 +605,7 @@ sin(const quantity<si::plane_angle,Y>& theta) /// tan of theta in radians template<class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<si::system,Y>::type tan(const quantity<si::plane_angle,Y>& theta) { @@ -573,6 +615,7 @@ tan(const quantity<si::plane_angle,Y>& theta) /// cos of theta in other angular units template<class System,class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<System,Y>::type cos(const quantity<unit<plane_angle_dimension,System>,Y>& theta) { @@ -581,6 +624,7 @@ cos(const quantity<unit<plane_angle_dimension,System>,Y>& theta) /// sin of theta in other angular units template<class System,class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<System,Y>::type sin(const quantity<unit<plane_angle_dimension,System>,Y>& theta) { @@ -589,6 +633,7 @@ sin(const quantity<unit<plane_angle_dimension,System>,Y>& theta) /// tan of theta in other angular units template<class System,class Y> +BOOST_CONSTEXPR typename dimensionless_quantity<System,Y>::type tan(const quantity<unit<plane_angle_dimension,System>,Y>& theta) { @@ -597,6 +642,7 @@ tan(const quantity<unit<plane_angle_dimension,System>,Y>& theta) /// acos of dimensionless quantity returning angle in same system template<class Y,class System> +BOOST_CONSTEXPR quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y> acos(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& val) { @@ -606,6 +652,7 @@ acos(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& va /// acos of dimensionless quantity returning angle in radians template<class Y> +BOOST_CONSTEXPR quantity<angle::radian_base_unit::unit_type,Y> acos(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system>,Y>& val) { @@ -615,6 +662,7 @@ acos(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system> /// asin of dimensionless quantity returning angle in same system template<class Y,class System> +BOOST_CONSTEXPR quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y> asin(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& val) { @@ -624,6 +672,7 @@ asin(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& va /// asin of dimensionless quantity returning angle in radians template<class Y> +BOOST_CONSTEXPR quantity<angle::radian_base_unit::unit_type,Y> asin(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system>,Y>& val) { @@ -633,6 +682,7 @@ asin(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system> /// atan of dimensionless quantity returning angle in same system template<class Y,class System> +BOOST_CONSTEXPR quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y> atan(const quantity<unit<dimensionless_type, homogeneous_system<System> >, Y>& val) { @@ -642,6 +692,7 @@ atan(const quantity<unit<dimensionless_type, homogeneous_system<System> >, Y>& v /// atan of dimensionless quantity returning angle in radians template<class Y> +BOOST_CONSTEXPR quantity<angle::radian_base_unit::unit_type,Y> atan(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system>, Y>& val) { @@ -651,6 +702,7 @@ atan(const quantity<unit<dimensionless_type, heterogeneous_dimensionless_system> /// atan2 of @c value_type returning angle in radians template<class Y, class Dimension, class System> +BOOST_CONSTEXPR quantity<unit<plane_angle_dimension, homogeneous_system<System> >, Y> atan2(const quantity<unit<Dimension, homogeneous_system<System> >, Y>& y, const quantity<unit<Dimension, homogeneous_system<System> >, Y>& x) @@ -661,6 +713,7 @@ atan2(const quantity<unit<Dimension, homogeneous_system<System> >, Y>& y, /// atan2 of @c value_type returning angle in radians template<class Y, class Dimension, class System> +BOOST_CONSTEXPR quantity<angle::radian_base_unit::unit_type,Y> atan2(const quantity<unit<Dimension, heterogeneous_system<System> >, Y>& y, const quantity<unit<Dimension, heterogeneous_system<System> >, Y>& x) |