From -3161036306713682621
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2340bb60e0f0f248
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-02-22 14:59:08 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Markus Werle <numerical.simulation@web.de>
Newsgroups: comp.std.c++
Subject: Re: proposal for resolution of "valarray operator[] const returning value" (closed isuue 77)
Date: Fri, 22 Feb 2002 22:58:38 GMT
Organization: Aachen University of Technology (RWTH)
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <a553j7$bv8$1@nets3.rz.RWTH-Aachen.DE>
References: <a4goca$5ln$1@nets3.rz.RWTH-Aachen.DE> <3c6c03e9.287237645@news.easynet.co.uk> <flu1sjzwhv.fsf@jambon.cmla.ens-cachan.fr> <7dc3b1ea.0202201107.6adbbf61@posting.google.com>
X-Trace: mail2news.demon.co.uk 1014418723 mail2news:7476 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Date: 22 Feb 2002 09:38:47 GMT
User-Agent: KNode/0.6.1
Lines: 47
Xref: archiver1.google.com comp.std.c++:9740

Peter Dimov wrote:

> Would introducing a data() member function solve this problem, or the
> problem in general?

It would be better. Nevertheless I feel unhappy
with this approach.
I always found that asymmetry of concepts is 
the thing that gives a lot of pain in C++.

The normal vector way to contact a fortran library is 

std::vector<double> v;
[...]
call_fortran_stuff(&v[0]);


So I think there is no need to complicate the use
of STL again. vector and valarray should be kept
in symmetry for those features that they (could) share.

We should consider the decisison to let
valarray<...>::operator[] const; return a value
as a decisison that had unwanted effects on its
usability and I look forward to a _clean_ fix, 
which does not need any further repair in the future.

I fear that with my policy-class approach
there are other problems which may crop up, so this is 
why I ask You again to look at it and to find them.


Markus




 



---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



