* James Kanze:
* James Kanze:
* Jeff Schwab:
[...]
Which if you think about it implies very different things at
the machine code level and at the source code level.
You keep insisting on this distinction.
Yes.
Yes, I think that's correct -- which was my point.
So where does it specify it. I've searched and I've searched,
but I can't find it. (Logically, it should be section 5, since
that's where expressions are treated.)
Hm, short term memory problems?
It's pointed out else-thread and up-thread.
Which you have even replied to.
Just a feeling the it's the right thing to do, correcting the incorrect
impression I responded to.
But perhaps you meant to ask, why does the standard refer to source code.
That's because the standard is about specifying the meaning of source code.
It maps Source code to an abstract Machine, S -> M.
It does NOT define the Effect of source code in terms of an abstract machine, it
doesn't use an abstract machine as the starting point, e.g. it doesn't compare S
-> E and M -> E, or whatever it is that you imagine (but veer away from making
too concrete), because then it would have to define the abstract machine like
e.g. Vienna, and then the standard would be perhaps twice the size.
If you think "can be called" can only refer to source code, then
you'll have to demonstrate that somehow.
Already done quite a few times here.
All the standard says
is "can be called", it doesn't say anything about a particular
source code syntax here.
That's right.
The standard is consistent in this case---T( int = 5 ) is a
default constructor, and can be called (by the compiler) without
arguments (since the compiler knows what arguments it needs).
And if you remove the parentheses that's also right.
Unfortunately, with the parentheses it's just complete nonsense.
The first parenthesis is nonsense: A C++98 compiler doesn't call anything in the
program being compiled, it generates machine code that calls.
The second parenthesis is nonsense: a machine code routine can't be called with
fewer arguments than it has and expect any well-defined effect.
The above is *what you need to address* to make your point (or at least one way
of doing it), namely to show that the standard's definition of a default
constructor under your non-source code interpretation, whatever it is, still
provides a clear cut definition of a default constructor, and not the least, one
that is consistent with what we "know" is a default constructor from the source
code interpretation, e.g. that T(int=5) is a T default constructor.
However, as far as I know that's impossible to show.
And that's borne out by your repeated failure to show it. You're one of the most
competent persons around here and you've tried for, I don't know, 5 years?, to
do that, and you have utterly failed every time, not even managing some likely
start or even handwaiving argument in that direction, but mostly, as this time
just steadfastly ignoring and evading. I don't think anyone else can do it when
you can't, and since you've failed every time, I don't think you can.
Considering that the textual interpretation works very well and is eminently
practical, and that your apparently impossible-to-clarify wooly and evasive
"it's something else!" doesn't currently work at all (no concrete description of
it available) and is thus completely impractical, well...
'Nuff said. Except -- I remember the one time you conceded the point above. It
wasn't then due to any valid technical argument such as those I've presented,
but only when I coughed up a logically invalid authority argument, namely
quoting Bjarne Stroustrup and Andrew Koenig referring to their source code call
as an "explicit constructor call". Would you like that again? Anything to
please, if I can still find it, that is.
Cheers & hth.,
- Alf