Boost logo

Ublas :

From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2005-09-08 10:06:37


Hi Michael,
I answer some of my own questions below.
Best, Paul
On Thu, 8 Sep 2005 10:13, Paul C. Leopardi wrote:
> Hi Michael,
> Have you tried with the latest snapshot of gcc 4.1 ?
>
> Try testing with pre-4.0.1 snapshots 4.0-20050507 versus 4.0-20050514 to
> see if the following changes by Nathan Sidwell affect this bug:
>
> 2005-05-10 Nathan Sidwell <nathan_at_[hidden]>
>
> PR c++/20723
> * pt.c (more_specialized_fn): Member functions are unordered wrt
> non-members. Conversion operators are unordered wrt other
> functions.
>
> PR c++/19203, implement DR 214
> * call.c (joust): Use more_specialized_fn.
> * cp-tree.h (DEDUCE_ORDER): Remove.
> (more_specialized): Replace with ...
> (more_specialized_fn): ... this.
> * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
> case.
> (type_unification_real): Remove DEDUCE_ORDER case.
> (more_specialized): Replace with ...
> (more_specialized_fn): ... this. Implement DR 214.
> (most_specialized_instantiation): Use get_bindings_real directly.

I have tested and can confirm that 4.0-20050507 works and 4.0-20050514 does
not work. This points the finger at Nathan Sidwell's changes listed above.

> PR 23513 may also be related. See
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23513
>
> The change we are seeing may be related to C++ Standard Core Language Issue
> 402. See http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02862.html and
> http://www.open-std.org/jtc1/sc22/WG21/docs/cwg_active.html
>
> 402. More on partial ordering of function templates
> Section: 14.5.5.2 temp.func.order
> Status: open
> Submitter: Nathan Sidwell
> Date: 7 Apr 2003
>
> I've tried with a few different versions and snapshots, with results:
[...]

> PS, the following, slightly simpler code fails on the line containing "mat
> Q".
>
> #include <boost/numeric/ublas/matrix.hpp>
> #include <boost/numeric/ublas/matrix_proxy.hpp>
> using namespace boost::numeric::ublas;
> int main()
> {
> typedef matrix<double> mat;
> mat K;
> matrix_range<mat> H_ (K, range(0,0), range(0,0));
> mat P = prod(K,H_);
> mat Q = prod<mat>(K,H_);
> }

I also tried using the simpler code above. Again, 4.0-20050507 works and
4.0-20050514 does not work.