Hi,
I used a previous version of the Units library to sketch out a fps system
(foot-pound-second) that paralleled the cgs system, and the code compiled
and ran fine. I am now returning to this effort, and I want to wrap it into
a coordinate transform package, but I can no longer get the code to compile.
I am using the latest code from the Boost sandbox, and MS Visual Studio with
WinXP. The problem appears to be in the conversions, but I don't see what is
missing when compared to cgs.
typedef unit my_unit;
typedef quantity< my_unit, ofs::Real64 > linear_measure;
linear_measure dummy(200.0*CGS::centimeter); // implicit conversion
from SI::meter to CGS::centimeter
linear_measure dummy2(200.0*FPS::foot);
The first three lines work fine, but the last one generates 10 errors with
my compiler (MSVC 8.0). The first error is
boost/units/detail/conversion_impl.hpp(342) : error C2039: 'type' :
is not a member of
'boost::units::detail::call_base_unit_converter'
with
[
Source=boost::units::foot_base_unit,
Dest=boost::units::unit>,boost::units::dimensionless_type>,boost::units::length_dimension>>>
]
boost/units/detail/conversion_impl.hpp(536) : see reference to class
template instantiation
'boost::units::detail::conversion_impl<N>::apply'
being compiled
with
[
N=1,
Begin=boost::units::dimension_list>,boost::units::dimensionless_type>,
DestinationSystem=boost::units::homogeneous_systemboost::units::meter_base_unit,boost::units::dimensionless_type>
]
boost/units/detail/conversion_impl.hpp(216) : see reference to class
template instantiation
'boost::units::detail::conversion_factor_helper' being compiled
with
[
Source=boost::units::unit>,boost::units::dimensionless_type>,boost::units::length_dimension>>>,
Dest=boost::units::unit>,boost::units::dimensionless_type>,boost::units::length_dimension>>>
]
boost/units/detail/conversion_impl.hpp(324) : see reference to class
template instantiation
'boost::units::detail::call_base_unit_converter_base_unit_impl::apply'
being compiled
with
[
Source=boost::units::foot_base_unit,
Dest=boost::units::meter_base_unit
]
boost/units/detail/conversion_impl.hpp(342) : see reference to class
template instantiation
'boost::units::detail::call_base_unit_converter' being compiled
with
[
Source=boost::units::foot_base_unit,
Dest=boost::units::unit>,boost::units::dimensionless_type>,boost::units::length_dimension>>>
]
boost/units/detail/conversion_impl.hpp(377) : see reference to class
template instantiation
'boost::units::detail::conversion_impl<N>::apply'
being compiled
with
[
N=1,
Begin=boost::units::dimension_list>,boost::units::dimensionless_type>,
DestinationSystem=boost::units::homogeneous_system>>,boost::units::dimension_listboost::units::steradian_base_unit,boost::units::dimensionless_type>>>>>>>>>
]
boost/units/detail/conversion_impl.hpp(372) : while compiling class
template member function 'boost::units::quantity
boost::units::conversion_helper::convert(const
boost::units::quantity,Y> &)'
with
[
Unit=my_unit,
Y=ofs::Real64,
From=boost::units::quantityboost::units::length_dimension,boost::units::FPS::system,double>,
To=boost::units::quantity,
Dim=boost::units::length_dimension,
System=boost::units::FPS::system
]
boost/units/quantity.hpp(167) : see reference to class template
instantiation 'boost::units::conversion_helper' being compiled
with
[
From=boost::units::quantityboost::units::length_dimension,boost::units::FPS::system,double>,
To=boost::units::quantity
]
testQuantifiedVector.cpp(47) : see reference to function template
instantiation
'boost::units::quantity::quantity,double>(const
boost::units::quantity,Y> &,void *)' being
compiled
with
[
Unit=my_unit,
Y=ofs::Real64,
Dim=boost::units::length_dimension,
System=boost::units::FPS::system
]
Any guidance in this would be greatly appreciated.
Pat