Discussion:
std::string name4 = name4;
(too old to reply)
Lynn McGuire
2010-08-06 20:04:49 UTC
Permalink
std::string name4 = name4;

Shouldn't this line of code generate a compiler error ?
It does not in Visual Studio 2005.

Lynn
Brian Muth
2010-08-06 21:06:38 UTC
Permalink
It compiles successfully under the online Comeau compiler, which is
considered very good when it comes to C++ standards.
Post by Lynn McGuire
std::string name4 = name4;
Shouldn't this line of code generate a compiler error ?
It does not in Visual Studio 2005.
Lynn
Lynn McGuire
2010-08-06 23:02:18 UTC
Permalink
Post by Lynn McGuire
std::string name4 = name4;
Shouldn't this line of code generate a compiler error ?
It does not in Visual Studio 2005.
It compiles successfully under the online Comeau compiler, which is considered very good when it comes to C++ standards.
The people on comp.lang.c++ are kinda calling it undefined
behavior. Me, I call it a bad uh-oh.

Thanks,
Lynn
Lynn McGuire
2010-08-07 18:53:54 UTC
Permalink
It compiles successfully under the online Comeau compiler, which is considered very good when it comes to C++ standards.
If you are willing, what does "int n = n;" do on the Comeau compiler ?

Thanks,
Lynn

Loading...