Boost C++ Libraries: Ticket #6957: Boost.units: static pow<>() fails for quantities with non-double type https://svn.boost.org/trac10/ticket/6957 <p> Below is a short example depicting that pow&lt;&gt;() works only in the quantity in the argument has double precision representation. Hope that helps. </p> <p> ajaruga@granda:~/icicle$ cat test.cpp #include &lt;boost/units/pow.hpp&gt; #include &lt;boost/units/systems/si.hpp&gt; using namespace boost::units; </p> <p> int main() { </p> <blockquote> <p> quantity&lt;si::length, real_t&gt; a = 1 * si::metres; quantity&lt;si::volume, real_t&gt; b = pow&lt;3&gt;(a); </p> </blockquote> <p> } ajaruga@granda:~/icicle$ g++ -Dreal_t=double test.cpp &amp;&amp; echo OK OK ajaruga@granda:~/icicle$ g++ -Dreal_t=float test.cpp &amp;&amp; echo OK test.cpp: In function ‘int main()’: test.cpp:7:44: error: conversion from ‘boost::units::power_typeof_helper&lt;boost::units::quantity&lt;boost::units::unit&lt;boost::units::list&lt;boost::units::dim&lt;boost::units::length_base_dimension, boost::units::static_rational&lt;1l&gt; &gt;, boost::units::dimensionless_type&gt;, boost::units::homogeneous_system&lt;boost::units::list&lt;boost::units::si::meter_base_unit, boost::units::list&lt;boost::units::scaled_base_unit&lt;boost::units::cgs::gram_base_unit, boost::units::scale&lt;10l, boost::units::static_rational&lt;3l&gt; &gt; &gt;, boost::units::list&lt;boost::units::si::second_base_unit, boost::units::list&lt;boost::units::si::ampere_base_unit, boost::units::list&lt;boost::units::si::kelvin_base_unit, boost::units::list&lt;boost::units::si::mole_base_unit, boost::units::list&lt;boost::units::si::candela_base_unit, boost::units::list&lt;boost::units::angle::radian_base_unit, boost::units::list&lt;boost::units::angle::steradian_base_unit, boost::units::dimensionless_type&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, float&gt;, boost::units::static_rational&lt;3l&gt; &gt;::type {aka boost::units::quantity&lt;boost::units::unit&lt;boost::units::list&lt;boost::units::dim&lt;boost::units::length_base_dimension, boost::units::static_rational&lt;3l&gt; &gt;, boost::units::dimensionless_type&gt;, boost::units::homogeneous_system&lt;boost::units::list&lt;boost::units::si::meter_base_unit, boost::units::list&lt;boost::units::scaled_base_unit&lt;boost::units::cgs::gram_base_unit, boost::units::scale&lt;10l, boost::units::static_rational&lt;3l&gt; &gt; &gt;, boost::units::list&lt;boost::units::si::second_base_unit, boost::units::list&lt;boost::units::si::ampere_base_unit, boost::units::list&lt;boost::units::si::kelvin_base_unit, boost::units::list&lt;boost::units::si::mole_base_unit, boost::units::list&lt;boost::units::si::candela_base_unit, boost::units::list&lt;boost::units::angle::radian_base_unit, boost::units::list&lt;boost::units::angle::steradian_base_unit, boost::units::dimensionless_type&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, double&gt;}’ to non-scalar type ‘boost::units::quantity&lt;boost::units::unit&lt;boost::units::list&lt;boost::units::dim&lt;boost::units::length_base_dimension, boost::units::static_rational&lt;3l&gt; &gt;, boost::units::dimensionless_type&gt;, boost::units::homogeneous_system&lt;boost::units::list&lt;boost::units::si::meter_base_unit, boost::units::list&lt;boost::units::scaled_base_unit&lt;boost::units::cgs::gram_base_unit, boost::units::scale&lt;10l, boost::units::static_rational&lt;3l&gt; &gt; &gt;, boost::units::list&lt;boost::units::si::second_base_unit, boost::units::list&lt;boost::units::si::ampere_base_unit, boost::units::list&lt;boost::units::si::kelvin_base_unit, boost::units::list&lt;boost::units::si::mole_base_unit, boost::units::list&lt;boost::units::si::candela_base_unit, boost::units::list&lt;boost::units::angle::radian_base_unit, boost::units::list&lt;boost::units::angle::steradian_base_unit, boost::units::dimensionless_type&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, float&gt;’ requested </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6957 Trac 1.4.3