Re: why cant functions return arrays
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Tue, 22 Apr 2008 00:50:49 +0100
jacob navia <jacob@xxxxxxxxxx> writes:
Ben Bacarisse wrote:
Maybe I missed the document you mean.http://www.q-software-solutions.de/~jacob/
There you will find a link to the specifications.
Ah, yes. That says a little more but not really enough. For example
I don't see anything about not allowing
T &operator=(T&, T&);
lcc-win32 seems to reject
T &operator=(T&, T*);
but that is not explained. Is that a problem with the compiler or the
specification?
How many times is operator= called in these cases:
T &operator=(T& x, int i) { ... }
T a1[5] = {1,2};
T a2 = {3};
(T[2]){1,2};
struct S { T t; };
S s1 = {1};
S s2 = {.x = 2};
S as[5] = {1,2};
Is the following permitted:
const T x = 42;
x = 43;
The compiler allows it but the specifications says nothing about it.
What is the meaning of a pointer argument? What does the remark
"References can be replaced by arrays of length 1." mean?
After reading the specification, I have more questions than when I started.
It would be very good for everybody if you would develop them
with me.
We disagree to much. I've already said I think it is a mistake to
consider initialisation as the same as assignment, for example. I
think we just see thing far too differently.
--
Ben.
.
- Follow-Ups:
- Re: why cant functions return arrays
- From: jacob navia
- Re: why cant functions return arrays
- References:
- Re: why cant functions return arrays
- From: Ben Bacarisse
- Re: why cant functions return arrays
- From: jacob navia
- Re: why cant functions return arrays
- From: Ben Bacarisse
- Re: why cant functions return arrays
- From: jacob navia
- Re: why cant functions return arrays
- Prev by Date: Re: why cant functions return arrays
- Next by Date: comp.compilers.lcc charter
- Previous by thread: Re: why cant functions return arrays
- Next by thread: Re: why cant functions return arrays
- Index(es):
Relevant Pages
|
|