
On Sat, Dec 26, 2009 at 12:16 AM, Brandon Olivares
On 2009-12-26, OvermindDL1 wrote:
You could just auto it. :) BOOST_AUTO(v, l/t); Then you do not need to bother figuring out what type it is, although it is your light_year_per_hour, although maybe a little more efficient representation.
If you just want the type of an expression like l/t if you want to typedef it or something, then you can use BOOST_TYPEOF. It is all in the documentation. :) _______________________________________________
Oh that's perfect; that has solved my problem! Thank you very much, and it only took 5 seconds to compile.
Yeah, I guess I should have thought of that earlier. I use BOOST_AUTO and BOOST_TYPEOF rather often actually since it can cut down on template instancing pretty dramatically in some libraries.