Live data from Hacker News

C++ compiler accepts explicit constructor call

connect.microsoft.com

1–10 of 30 posts

Re: C++ compiler accepts explicit constructor call

#7
post #5

Unless this breaks valid C++ code, I don't see how they need care too much about fixing it, especially since that would break existing code.

A quote from Stroustrup:

"Use of a supplier's language extensions and non-standard-conforming features limits the portability of your code and can prevent you from choosing a new implementation supplier."

http://www.stroustrup.com/compilers.html

Re: C++ compiler accepts explicit constructor call

#8
post #7
post #5

Unless this breaks valid C++ code, I don't see how they need care too much about fixing it, especially since that would break existing code.

A quote from Stroustrup: "Use of a supplier's language extensions and non-standard-conforming features limits the portability of your code and can prevent you from choosing a new implementation supplier." http://www.stroustrup.com/compilers.html

Quite a valid observation from Stroustrup. But in this case the programmer has chosen to use a non-standard, vendor specific feature. So it is not clear how it applies here? (Especially given the cost of breaking existing code)

Re: C++ compiler accepts explicit constructor call

#10
post #7

Earlier quoted context omitted.

A quote from Stroustrup: "Use of a supplier's language extensions and non-standard-conforming features limits the portability of your code and can prevent you from choosing a new implementation supplier." http://www.stroustrup.com/compilers.html

Quite a valid observation from Stroustrup. But in this case the programmer has chosen to use a non-standard, vendor specific feature. So it is not clear how it applies here? (Especially given the cost of breaking existing code)

The programmer inadvertently used a vendor-specific feature. This is the key difference. Nobody writes perfect, standards-compliant code all the time, so the compiler needs to tell you when you are doing this.
Post reply on HN