octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dim_vector constructor problem


From: John W. Eaton
Subject: dim_vector constructor problem
Date: Wed, 28 Apr 2010 01:53:27 -0400

The changeset

  http://hg.savannah.gnu.org/hgweb/octave/rev/69ecfbffcf4f

is causing trouble with builds that use 64-bit indexing
(--enable-64).  There is a bug report about it:

  https://savannah.gnu.org/bugs/?29692

The real cause is that it introduces an ambiguity for calls like

  dim_vector (0, 0)

when octave_idx_type is not a typedef for int.

I thought I could solve the problem with a few strategically placed
casts, or by making the second argument of the new constructor be int
instead of size_t, but that did not work.

Given that we also now have

  dim_vector (i, j, k, ...)

constructors for up to 7 dimensions, does anyone object to removing
the

  dim_vector (const octave_idx_type *vec, size_t vec_size)

constructor that was added by this changeset?  To me, it seems the
simplest solution to the problem.  Do we lose anything by not having
this constructor now?

I checked in a changeset to remove the constructor and I closed the
bug report.  But if there are objections, I can reconsider, provided
that there is also some reasonable way to solve the 64-bit compile
problem.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]