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
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::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary &'
with
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
and
[
T1=double,
E1=boost::numeric::ublas::matrix,
T2=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary'
with
[
T1=double,
E1=boost::numeric::ublas::matrix,
T2=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::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::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary &'
with
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
and
[
T1=double,
E1=boost::numeric::ublas::matrix,
T2=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary'
with
[
T1=double,
E1=boost::numeric::ublas::matrix,
T2=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E2=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity::value_type>>
]
and
[
E1=Bayesian_filter_matrix::RowMatrix,
E2=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::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::matrix_matrix_binary(
const boost::numeric::ublas::matrix_matrix_binary &)' : cannot
convert parameter 1 from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary &'
with
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
and
[
T1=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E1=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity
::value_type>>,
T2=double,
E2=boost::numeric::ubla
s::matrix
]
and
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
Reason: cannot convert from
'boost::numeric::ublas::matrix_matrix_binary_traits::result_typ
e' to 'const boost::numeric::ublas::matrix_matrix_binary'
with
[
T1=boost::numeric::ublas::scalar_identity::value_type>::result_t
ype,
E1=boost::numeric::ublas::matrix_unary2,boost::numeric::ublas::scalar_identity
::value_type>>,
T2=double,
E2=boost::numeric::ublas::matrix
]
and
[
E1=Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type,
E2=Bayesian_filter_matrix::ColMatrix,
F=boost::numeric::ublas::matrix_matrix_prod::value_type,boost::n
umeric::ublas::matrix_unary2::value_type>>::value_type,boost::numer
ic::ublas::matrix_matrix_binary_traits::value_type,Bayesian_filt
er_matrix::RowMatrix,boost::numeric::ublas::matrix_unary2::value_ty
pe>>::value_type,Bayesian_filter_matrix::prod_SPD_matrix_traits::XT_type>::promote_type>
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
---
Doug Swallow
doug@2150.com
wrote in message
news:009401c31853$7b160a20$87389250@mshome.net...
probably
one of the first to give this a try ;-)