Boost logo

Boost :

Subject: Re: [boost] [units] - learning to use, more questions :)
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2011-11-28 15:35:33


now I started writing a simple code that would calculate a quantum
wavefunction of a harmonic oscillator. It would work very quickly
without units, but I want to do this using units, just to learn more
using units :)

And I've hit a brick wall, because I cannot get those lines to compile:

    quantity<reciprocal_area> lambda ( 2.0*m*E / (hbar*hbar) );
    quantity<reciprocal_area> alpha ( m*omega/root<2>(hbar) );
    double lambda_per_alpha ( lambda / alpha );

Even the first one has problems, to my surprise. Maybe I really
should change my g++ version to a newer version? I will gladly try
this if you think it makes sense. Would upgrading boost help?

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk