Re: [Quantity-devel] Quantity in stl vector
Brought to you by:
berndspeiser
|
From: <ber...@t-...> - 2004-07-05 08:14:42
|
Kai Ludwig wrote: > Hi, > > tested the following: > > std::vector<Concentration> > > got several warning from g++-3.2 > > /Quantity/Variable.h: In copy constructor > `Quantities::Variable<Quantities::Quantity<GT, Loki::Typelist<U, UTail>, > DU, DT>, U>::Variable(const Quantities::Variable<Quantities::Quantity<GT, > Loki::Typelist<U, UTail>, DU, DT>, U>&) [with GT = > Quantities::ConcentrationGroup, Head = > Quantities::ConcentrationUnits::MolePerLitre, Tail = > Loki::Typelist<Quantities::ConcentrationUnits::MilliMolePerLitre, > Loki::NullType>, DU = Quantities::ConcentrationUnits::MolePerLitre, U = > Quantities::ConcentrationUnits::MolePerLitre, DT = double]':modelParametersDialog.cpp:93: instantiated from `void > std::_Construct(_T1*, const _T2&) [with _T1 = Quantities::Concentration, > _T2 = Quantities::Variable<Quantities::ConcentrationQuantities, > Quantities::ConcentrationUnits::MolePerLitre>]'modelParametersDialog.cpp:492: instantiated from `void std::vector<_Tp, > _Alloc>::push_back(const _Tp&) [with _Tp = Quantities::Concentration, > _Alloc = std::allocator<Quantities::Concentration>]'modelParametersDialog.cpp:319: instantiated from here > /home/kl/software/src/quantity/Quantities/Quantity/Variable.h:132: > warning: base class `struct > Quantities::Quantity<Quantities::ConcentrationGroup, > Quantities::ConcentrationUnits::ConcentrationUnits, > Quantities::ConcentrationUnits::MolePerLitre, double>' should be > explicitly initialized in the copy constructor > and also > > ies/Quantity/Unit.h:928: warning: `double dummy' might be used > uninitialized in this function Kai, I can't reproduce this error with gcc 3.2 on my notebook, when I try std::vector<Concentration> c_vec; Is this really 3.2 and not 3.4??? Also, did you write a variable name, such as c_vec above? Bernd -- ======================================================================= Bernd Speiser Institut f"ur Organische Chemie Auf der Morgenstelle 18 D-72076 T"ubingen Germany phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory) fax: +49-7071-295518 e-mail: ber...@un... Internet: http://www.uni-tuebingen.de/speiser ======================================================================= |