|
Boost Users : |
Subject: Re: [Boost-users] [Units] Temperature conversion problem
From: Matthias Schabel (boost_at_[hidden])
Date: 2011-12-01 11:22:20
>
> Not being a current user of boost units I was curious about above code and just thought I'd try it (it looked totally straightforward and I was thinking hmm maybe I should be using boost units at times) - However it didn't compile (msvc 2010 and boost 1.48) - It wasn't exactly hard to change it so it would compile - just played around a little and ended up adding :-
>
> #include <boost/units/quantity.hpp>
> #include <boost/units/io.hpp>
>
> However given your email had outputs pasted in so obviously code was running at some point I wondered : Was this just a cut & paste typo? Or do you need to be careful with headers in code using boost unit to make sure that it compiles x-platform or some such?
Probably a cut-and-paste typo - I just lobbed that code into an existing project, so these headers were already included somewhere. The only necessary care with headers that I am aware of is making sure that the order of inclusion of defined conversions and custom IO formatting is correct.
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