Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-12-14 17:50:18


The dimension test now produces unmangled (and plausible but verbose!) output
OK.

Compile time 20 sec on my 700 Mhz Athlon, so perhaps 5 sec on a new machine?
which is worryingly long. However, perhaps in practice this will not increase
for more real-life code?

Test_units fails to compile (after 30 sec) :

Compiling...
test_units.cpp
units\dimensioned_quantity.hpp(118) : error C2027: use of undefined type
'boost::STATIC_ASSERTION_FAILURE<x>'
        with
        [
            x=false
        ]
        units\dimensioned_quantity.hpp(118) : see reference to class template
instantiation 'boost::STATIC_ASSERTION_FAILURE<x>' being compiled
        with
        [
            x=false
        ]
        test_units.cpp(207) : see reference to function template instantiation
'mcs::units::DimensionedQuantity<Y,T>::DimensionedQuantity<mcs::units::quantity_
type>(const
mcs::units::DimensionedQuantity<Y,mcs::units::DimensionedUnit<Model,Dim>> &)'
being compiled
        with
        [
            Y=double,
            T=mcs::units::SIModel::temperature_unit,
            Model=mcs::units::SIModel,
            Dim=mcs::units::quantity_type
        ]

Build Time 0:31

I added

#ifdef _MSC_VER
# pragma warning(disable: 4511) // copy constructor could not be generated
# pragma warning(disable: 4512) // assignment operator could not be generated
# pragma warning(disable: 4100) // unreferenced formal parameter
# pragma warning(disable: 4701) // local variable may be used without having
been initialized
# pragma warning(disable: 4127) // conditional expression is constant
# pragma warning(disable: 4189) // local variable is initialized but not
referenced
#endif

to disable unhelpful warnings at MS level 4,

This change from the previous test (still OK) appears to trigger the problem.

   // test ideal gas law
    SI<double>::Temperature T = (273.+37.)*_kelvin;
    SI<double>::Pressure P = 1.01325e5*_pascals;
    SI<double>::Length r = 0.5e-6*_meters;
    SI<double>::Volume V = (4.0/3.0)*3.141592*power<3>(r);
    SI<double>::Quantity n(idealGasLaw(P,V,T));

    std::cout << r << std::endl
              << P << std::endl
              << V << std::endl
              << T << std::endl
              << n << std::endl
              << std::endl;

Suggestions?

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Matthias Schabel
| Sent: Wednesday, December 10, 2003 3:12 PM
| To: Boost mailing list
| Subject: Re: [boost] Re: new compile-time dimensional analysis and unit
library
|
| http://groups.yahoo.com/group/boost/files/YANL/YANLv2.zip
|


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