Boost logo

Boost Users :

Subject: Re: [Boost-users] [Units] Unable to raise constant to power of two
From: Matthias Schabel (boost_at_[hidden])
Date: 2011-12-05 12:28:40


> In the attached code I am trying to take a constant physical unit and
> raise it to a power of two. The compiler is complaining that it cannot
> find a template to satisfy multiply_typeof_helper. It says that there
> are more than one partial specialization that matches the template
> argument list. I read something on the web about there was no pow
> operation for constants. The solution to that problem was to upgrade
> to Boost 1.48. Unforunately I am constrained to using Boost 1.45. What
> is an work around for this problem?'

You also should probably not be replicating the, perhaps overly, complicated constants
infrastructure; for user code, you can just as easily do:

static const quantity<blah> const(somevalue);

This should sidestep the missing function problem and other subtle issues...

Matthias


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net