|
Boost Users : |
From: Doug Swallow (yg-boost-users_at_[hidden])
Date: 2003-05-21 12:34:35
I've been trying to compile the Bayes++ code which requires ublas, so I've
been in the learning-about-boost phase since yesterday and ran into this
myself using VS.NET 2003.
I've downloaded the 5/19 release of ublas and placed it in the 1.30.0
release of boost, and had to:
1) uncomment the #define BOOST_UBLAS_NO_NESTED_CLASS_RELATION
2) Add "#define BOOST_UBLAS_TYPENAME typename" to the MSVC section
('typename' being what's different) (yeah, I know I'm breaking VC6, and it
should be #if'd in there if it's going to stay, but I'm just trying to get
this to compile)
#1 got rid of a lot of errors, and #2 got rid of everything else but 3
errors.
So, I'm left with trying to get my head above all the template usage. If
anyone can provide some insight, I'd appreciate it. This is probably a
little more towards the Bayes++ side, not boost, but thought I'd ask here
since I did want to mention the 'typename' issue and VC7.1 which I hadn't
seen mentioned yet:)
Here's the error output:
c:\Documents and Settings\dswallow\My Documents\Visual Studio
Projects\Bayes++\BayesFilter\uBLASmatrix.hpp(544) : error C2664:
'boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &'
with
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Ro
wMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
and
[
T1=double,
E1=boost::numeric::ublas::matrix<double,boost::numeric::ublas::row_major>,
T2=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::row_major>,boost::numeric::ublas::scalar_identity<Ba
yesian_filter_matrix::detail::FMMatrix<Bayesian_filt
er_matrix::detail::BaseRowMatrix>::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Ro
wMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>'
with
[
T1=double,
E1=boost::numeric::ublas::matrix<double,boost::numeric::ublas::row_major>,
T2=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::row_major>,boost::numeric::ublas::scalar_identity<Ba
yesian_filter_matrix::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseR
owMatrix>::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Ro
wMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
c:\Documents and Settings\dswallow\My Documents\Visual Studio
Projects\Bayes++\BayesFilter\uBLASmatrix.hpp(554) : error C2664:
'boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &'
with
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Ro
wMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
and
[
T1=double,
E1=boost::numeric::ublas::matrix<double,boost::numeric::ublas::row_major>,
T2=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::row_major>,boost::numeric::ublas::scalar_identity<Ba
yesian_filter_matrix::detail::FMMatrix<Bayesian_filt
er_matrix::detail::BaseRowMatrix>::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Ro
wMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>'
with
[
T1=double,
E1=boost::numeric::ublas::matrix<double,boost::numeric::ublas::row_major>,
T2=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::row_major>,boost::numeric::ublas::scalar_identity<Ba
yesian_filter_matrix::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseR
owMatrix>::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_
matrix::RowMatrix>::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
c:\Documents and Settings\dswallow\My Documents\Visual Studio
Projects\Bayes++\BayesFilter\uBLASmatrix.hpp(594) : error C2664:
'boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F> &'
with
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Co
lMatrix>::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
and
[
T1=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E1=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::column_major>,boost::numeric::ublas::scalar_identity
<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_filter_matrix::detail::Ba
seRowMatrix>::value_type>>,
T2=double,
E2=boost::numeric::ubla
s::matrix<double,boost::numeric::ublas::column_major>
]
and
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Co
lMatrix>::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits<T1,E1,T2,E2>::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary<E1,E2,F>'
with
[
T1=boost::numeric::ublas::scalar_identity<Bayesian_filter_matrix::detail::FM
Matrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type>::result_t
ype,
E1=boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double
,boost::numeric::ublas::column_major>,boost::numeric::ublas::scalar_identity
<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_filter_matrix::detail::Ba
seRowMatrix>::value_type>>,
T2=double,
E2=boost::numeric::ublas::matrix<double,boost::numeric::ublas::column_major>
]
and
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_filter_matrix::Co
lMatrix>::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod<Bayesian_filter_matrix::detail::
FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,boost::n
umeric::ublas::matrix_unary2<Bayesian_filter_matrix::RowMatrix,boost::numeri
c::ublas::scalar_identity<Bayesian_filter_matrix::detail::FMMatrix<Bayesian_
filter_matrix::detail::BaseRowMatrix>::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits<Bayesian_filter_matrix::detail::FMMat
rix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2<Bayesian_filter_ma
trix::RowMatrix,boost::numeric::ublas::scalar_identity<Bayesian_filter_matri
x::detail::FMMatrix<Bayesian_filter_matrix::detail::BaseRowMatrix>::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits<Bayesian_fil
ter_matrix::RowMatrix>::XT_type>::promote_type>
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
--- Doug Swallow doug_at_[hidden] <jhr.walter_at_[hidden]> wrote in message news:009401c31853$7b160a20$87389250_at_mshome.net... > Hi Ian, > > you wrote: > > > When i try to compile the code in listing 1 below using MSVC7.1 i get a > > whole host of errors of the same form as that given in listing 2. I've > > looked around on google but either i'm not concentrating or this issue > > hasn't come up yet. > > John Maddock reported and explained this problem to me some time ago > (thanks!) and I've (hopefully) implemented a *ugly* workaround for it. The > problem is due to the questions of DR 135 and its (new ;-) interpretation > through MS. The correct solution probably would be to separate class member > declarations and definitions, but then the code probably wouldn't work with > MSVC 6.0 anymore :-(. > > > I've also had a quick look in boost/format but would > > rather not hack around with stuff i don't know. Does anyone know what i > > need to do to get this working? > > You can download one of the newer version from > http://groups.yahoo.com/group/ublas-dev/files and try to enable > > // #define BOOST_UBLAS_NO_NESTED_CLASS_RELATION > > in the MSVC section of ublas' config.hpp. But be aware that you're probably > one of the first to give this a try ;-)
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