
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andy Little Sent: Wednesday, August 16, 2006 7:46 AM To: boost@lists.boost.org Subject: Re: [boost] Boost Units library preview
Hi Eric,
...
Tested in VC7.1 and VC8.0 of vthe two examples gave compile errors. Testing in gcc 4.0 gave a failed assertion at runtime
I assume you mean the measure_test. Try the following simple patch: *** units-preview/libs/units/test/measure_test.cpp.orig Thu Aug 17 10:50:15 2006 --- units-preview/libs/units/test/measure_test.cpp Thu Aug 17 10:52:27 2006 *************** *** 38,52 **** feet f1 (1); assert (f1.value () == 1); f1 = 3; ! assert (f1.value () == 3); feet f2 (2); length_quantity q2 (f2); q2 = f1; feet f3 (q2); ! assert (f3.value () == 3); f2 = q2; ! assert (f2.value () == 3); // mixed units --- 38,52 ---- feet f1 (1); assert (f1.value () == 1); f1 = 3; ! assert (f1.value() > 2.999 && f1.value() < 3.001); feet f2 (2); length_quantity q2 (f2); q2 = f1; feet f3 (q2); ! assert (f1.value() > 2.999 && f1.value() < 3.001); f2 = q2; ! assert (f1.value() > 2.999 && f1.value() < 3.001); // mixed units Eric.