I'm trying to make a "simple" cartesian vector class.
It should be similar to the quaternion example that you give in the docs,
but I can't get it to compile.
I've attached a complete program.
Here are the error I get when I try to compile it.
Lets just focus on fixing the first few errors about no binary '*'. When I
understand that, perhaps I'll be able to fix the rest.
Thanks, terry
try.cpp
using native typeof
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2678: binary
'*' : no operator found which takes a left-hand operand of type 'double' (or
there is no acceptable conversion)
C:/boost/boost_1_43_0\boost/units/detail/one.hpp(47): could be 'T
boost::units::operator *<T>(const boost::units::one &,const T &)'
with
[
T=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/detail/one.hpp(53): or 'T
boost::units::operator *<double>(const T &,const boost::units::one &)'
with
[
T=double
]
C:/boost/boost_1_43_0\boost/units/detail/one.hpp(58): or
'boost::units::one boost::units::operator *(const boost::units::one &,const
boost::units::one &)'
while trying to match the argument list '(double,
rci::cartesian::vector)'
with
[
Dim=3,
Rep=double
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(75) : see reference
to class template instantiation
'boost::units::multiply_typeof_helper::nested' being compiled
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/quantity.hpp(690) : see reference
to class template instantiation 'boost::units::multiply_typeof_helper'
being compiled
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
try.cpp(255) : see reference to class template instantiation
'boost::units::multiply_typeof_helper' being compiled
with
[
X=boost::units::quantityboost::units::si::length,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2866:
'boost::units::multiply_typeof_helper::nested::_typeof_register_value'
: a const static data member of a managed type must be initialized at the
point of declaration
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2027: use of
undefined type
'boost::type_of::msvc_extract_type<ID>::id2type_impl<__formal>'
with
[
ID=boost::units::multiply_typeof_helper>::nested
]
and
[
__formal=true
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2146: syntax
error : missing ';' before identifier 'type'
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C4430: missing
type specifier - int assumed. Note: C++ does not support default-int
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2602:
'boost::units::multiply_typeof_helper::nested::type' is not a member of
a base class of 'boost::units::multiply_typeof_helper::nested'
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : see
declaration of 'boost::units::multiply_typeof_helper::nested::type'
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : see
declaration of 'boost::units::multiply_typeof_helper::nested'
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
C:/boost/boost_1_43_0\boost/units/operators.hpp(74) : error C2868:
'boost::units::multiply_typeof_helper::nested::type' : illegal syntax
for using-declaration; expected qualified-name
with
[
X=double,
Y=rci::cartesian::vector<3,double>
]
try.cpp(255) : error C2679: binary '=' : no operator found which takes a
right-hand operand of type 'boost::units::quantity' (or there is no
acceptable conversion)
with
[
Unit=boost::units::unitboost::units::length_dimension,boost::units::si::system,
Y=int
]
try.cpp(28): could be 'rci::cartesian::vector
&rci::cartesian::vector::operator =(const
rci::cartesian::vector &)'
with
[
Dim=3,
Rep=boost::units::quantityboost::units::si::length
]
while trying to match the argument list
'(rci::cartesian::vector, boost::units::quantity)'
with
[
Dim=3,
Rep=boost::units::quantityboost::units::si::length
]
and
[
Unit=boost::units::unitboost::units::length_dimension,boost::units::si::system,
Y=int
]