L
Lefevre
Hello.
I recently discovered that this kind of code :
| struct Object
| {
| string f() { return string("Toto"); }
| }
|
| int main( ... )
| {
| Object o;
|
| cout << o.f().c_str() << endl;
|
| return 0;
| }
Is working fine with SUN's C++ compilers and Visual C++ 6 (compiler)
but not fine at all with AIX ones.
What is the status of this kind of code ( o.f().g().h().j() )
a) Is this part of the C++ standard ?
b) Is this only a features that is supposed by the standard to be
compiler dependent ?
c) Is this an AIX compiler bug ?
I would say the answer is the b) one, but i'm not sure.
What is your point of view about this ?
Regards.
Benoit Lefevre.
I recently discovered that this kind of code :
| struct Object
| {
| string f() { return string("Toto"); }
| }
|
| int main( ... )
| {
| Object o;
|
| cout << o.f().c_str() << endl;
|
| return 0;
| }
Is working fine with SUN's C++ compilers and Visual C++ 6 (compiler)
but not fine at all with AIX ones.
What is the status of this kind of code ( o.f().g().h().j() )
a) Is this part of the C++ standard ?
b) Is this only a features that is supposed by the standard to be
compiler dependent ?
c) Is this an AIX compiler bug ?
I would say the answer is the b) one, but i'm not sure.
What is your point of view about this ?
Regards.
Benoit Lefevre.