Boost logo

Boost Users :

Subject: [Boost-users] [Units] Require help troubleshooting a template error with linear_algebra.hpp
From: Stephen Torri (stephen.torri_at_[hidden])
Date: 2011-12-09 11:30:52


Below is a dump of the build output from compiling the stand alone
example. In order to understand what I am doing I am trying to setup a
boost unit system where length is in kilometers, angle is in degrees
and time is in minutes. I would like to have the ability to enter
automatically convert angles from degrees to radians. In addition I am
attemping to make the angle types I use to be dimensionless.

Regards,
Stephen

-----------
1>Compiling...
1>boost_units.cpp
1>C:\boost\boost/units/detail/linear_algebra.hpp(342) : error C3083:
'item': the symbol to the left of a '::' must be a type
1> C:\boost\boost/units/detail/linear_algebra.hpp(310) : see
reference to class template instantiation
'boost::units::detail::invert_handle_inital_rows<0>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> RowsBegin=boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::new_matrix>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<-1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::identity_result>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(310) : see
reference to class template instantiation
'boost::units::detail::invert_handle_inital_rows<N>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> N=1,
1> RowsBegin=boost::units::list<boost::units::dimensionless_type,boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::new_matrix>>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<-1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::identity_result>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(501) : see
reference to class template instantiation
'boost::units::detail::invert_handle_inital_rows<N>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> N=2,
1> RowsBegin=boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::list<boost::units::dimensionless_type,boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::new_matrix>>>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<-1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::identity_result>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(503) : see
reference to class template instantiation
'boost::units::detail::invert_impl<N>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> N=1,
1> RowsBegin=boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::list<boost::units::dimensionless_type,boost::units::list<boost::units::detail::eliminate_from_pair_of_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::static_rational<0,1>,boost::units::static_rational<1>>::type,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::new_matrix>>>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<-1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::identity_result>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(503) : see
reference to class template instantiation
'boost::units::detail::invert_impl<N>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> N=2,
1> RowsBegin=boost::units::list<boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::detail::determine_extra_equations_impl<0>::apply<boost::units::dimensionless_type,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>::type>>>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<-1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::invert_handle_after_pivot_row<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>>::identity_result>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(542) : see
reference to class template instantiation
'boost::units::detail::invert_impl<N>::apply<RowsBegin,IdentityBegin>'
being compiled
1> with
1> [
1> N=3,
1> RowsBegin=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::list<boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::dimensionless_type>>>,
1> IdentityBegin=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::list<boost::units::list<boost::units::static_rational<0,1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>>,boost::units::detail::make_identity<0>::apply<3>::type>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(828) : see
reference to class template instantiation
'boost::units::detail::make_square_and_invert<Matrix>' being compiled
1> with
1> [
1> Matrix=boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::list<boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::list<boost::units::dim<boost::units::plane_angle_base_dimension,boost::units::static_rational<1>>,boost::units::dimensionless_type>>::type,boost::units::list<boost::units::static_rational<1>,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::list<boost::units::list<boost::units::static_rational<1>,boost::units::list<boost::units::detail::calculate_base_dimension_coefficients_func<false>::apply<boost::units::dimensionless_type>::type,boost::units::detail::expand_dimensions<0>::apply<boost::units::dimensionless_type,boost::units::dimensionless_type>::type>>,boost::units::dimensionless_type>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(1032) : see
reference to class template instantiation
'boost::units::detail::normalize_units<T>' being compiled
1> with
1> [
1> T=boost::units::list<myproject::units::minute_base_unit,boost::units::list<myproject::units::angle::degree_base_unit,boost::units::list<myproject::units::earth::kilometer_base_unit,boost::units::dimensionless_type>>>
1> ]
1> C:\boost\boost/units/detail/linear_algebra.hpp(1051) : see
reference to class template instantiation
'boost::units::detail::calculate_base_unit_exponents_impl<false>::apply<T,Dimensions>'
being compiled
1> with
1> [
1> T=boost::units::list<myproject::units::minute_base_unit,boost::units::list<myproject::units::angle::degree_base_unit,boost::units::list<myproject::units::earth::kilometer_base_unit,boost::units::dimensionless_type>>>,
1> Dimensions=boost::units::length_dimension
1> ]
1> C:\boost\boost/units/heterogeneous_system.hpp(243) : see
reference to class template instantiation
'boost::units::detail::calculate_base_unit_exponents<T,Dimensions>'
being compiled
1> with
1> [
1> T=boost::units::list<myproject::units::minute_base_unit,boost::units::list<myproject::units::angle::degree_base_unit,boost::units::list<myproject::units::earth::kilometer_base_unit,boost::units::dimensionless_type>>>,
1> Dimensions=boost::units::length_dimension
1> ]
1> C:\boost\boost/units/unit.hpp(92) : see reference to class
template instantiation
'boost::units::detail::make_heterogeneous_system<Dimensions,System>'
being compiled
1> with
1> [
1> Dimensions=boost::units::length_dimension,
1> System=myproject::units::earth::system
1> ]
1> C:\boost\boost/units/unit.hpp(99) : see reference to class
template instantiation 'boost::units::reduce_unit<Unit>' being
compiled
1> with
1> [
1> Unit=boost::units::unit<boost::units::length_dimension,myproject::units::earth::system>
1> ]
1> ..\..\..\apps\boost_units\boost_units.cpp(81) : see
reference to class template instantiation
'boost::units::is_implicitly_convertible<S1,S2>' being compiled
1> with
1> [
1> S1=boost::units::unit<boost::units::length_dimension,myproject::units::earth::system>,
1> S2=boost::units::unit<boost::units::length_dimension,myproject::units::earth::system>
1> ]
1>C:\boost\boost/units/detail/linear_algebra.hpp(342) : error C2039:
'Numerator' : is not a member of 'boost::units::dimensionless_type'
1> C:\boost\boost/units/dimensionless_type.hpp(37) : see
declaration of 'boost::units::dimensionless_type'
1>C:\boost\boost/units/detail/linear_algebra.hpp(342) : error C2065:
'Numerator' : undeclared identifier




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net