Boost logo

Ublas :

From: Thomas Lemaire (thomas.lemaire_at_[hidden])
Date: 2005-09-06 06:34:12


thanks a lot ! it really solves my problem !

I forward this mail to the mailing list so that it gets archived again ;-)

On Tuesday 06 September 2005 12:04, patrick.kowalzick wrote:
> Hello Michael, hello Thomas,
>
> I can not post from work, so here my mail to you both.
>
> Regards,
> Patrick
>
>
>
> Hello Thomas,
>
> Joerg and me discussed this topic a while ago. The cases you describe
> _never_
> worked on MSVC 7.1 and funny enough gcc agrees _now_.
>
> -Start of the discussion:
> http://groups.yahoo.com/group/ublas-dev/message/964
>
> -Problem posted in comp.lang.c++.moderated
> http://groups.google.com/group/comp.lang.c++.moderated/browse_frm/thread/c7
>3 907
> 0c7ee77548/cb6a654bdeb1c17e?tvc=1#cb6a654bdeb1c17e
> -Problem posted in comp.std.c++
> http://groups.google.com/group/comp.std.c++/browse_frm/thread/3b5faa9aaea18
>0 95/
> 43a43f911d65aaab?
> lnk=st&q=Function+template+overload+resolution&rnum=1#43a43f911d65aaab
> (if the links do not work, just search for "function template overload
> resolution" in google.groups)
>
> -Somewhere there is a gcc bug report. I have to search it in my emails.
>
> Interessting enough: nobody was sure to interpret the standard correctly
> :).
>
> The workaround is rather easy:
> Replace prod<mat>(A,B) with mat(prod(A,B)).
>
> Regards,
> Patrick
>
> Thomas Lemaire <thomas.lemaire <at> laas.fr> writes:
> > Dear list,
> >
> > I have a strange compilation problem with this line (sym_mat and mat are
> > typedef) :
> >
> > P -= prod<sym_mat>(prod<mat>(K,H_), P);
> >
> > P is a sym_mat, K is a mat and H_ a mat_range... I have been using this
>
> for
> a
>
> > while with boost cvs/gcc3.3 and it compiled well...
> > My config has just changed and I am now using stable boost 1.33 and gcc4.
> >
> > the compilation error concerns the inside prod<mat>(K,H_):
> >
> > error: call of overloaded 'prod(jblas::mat&, const
> > boost::numeric::ublas::matrix_range<jblas::mat>&)' is ambiguous
> >
> > /usr/include/boost/numeric/ublas/matrix_expression.hpp:4636: note:
>
> candidates
>
> > are: typename boost::numeric::ublas::matrix_matrix_binary_traits<typename
> > E1::value_type, E1, typename E2::value_type, E2>::result_type
> > boost::numeric::ublas::prod(const
> > boost::numeric::ublas::matrix_expression<E>&, const
> > boost::numeric::ublas::matrix_expression<E2>&) [with E1 = jblas::mat, E2
> > =
> >
> > boost::numeric::ublas::matrix_range<jblas::mat>]
> >
> > /usr/include/boost/numeric/ublas/matrix_expression.hpp:4695:
>
> note:
> > M boost::numeric::ublas::prod(const
> > boost::numeric::ublas::matrix_expression<E2>&, const
> > boost::numeric::ublas::matrix_expression<E2>&) [with M = jblas::mat, E1 =
> > boost::numeric::ublas::matrix<double,
> > boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
> > boost::numeric::ublas::unbounded_array<double, std::allocator<double> >
> > >,
>
> E2
>
> > = boost::numeric::ublas::matrix_range<jblas::mat>]

-- 
thomas