What is wrong with VC++?
Sometimes its behavior baffles me. I have a scaled down implemented string class which has a constructor which takes a const char*. The + operator is overloaded for concatenation and so I can add a string literal to an object of the class via a constructor conversion.
So out of curiosity I decided to make that constructor explicit to check that I could no longer convert from a const char*. To my surprise, it didn't complain on compilation and carried out the conversion. I compiled it again and again and the same result. I even whimsically made all of the other constructors explicit out of desperation, still no error.
It was only after rebooting and firing up VC++ again that the explicit specifier was taken notice of. Is there something obvious that I'm missing here, or is VC++ just a couple of sandwiches short of a picnic?
>> or is VC++ just a couple of sandwiches short of a picnic?
I wouldn't rule it out, personally. :p
Come to think of it, given how frequently Intellisense just won't fire up until I cross my eyes and stick my tongue out at a certain angle, neither would I.
Originally Posted by Sebastiani
Sounds like the issue is not the compiler but something wrong in the build environment. The most likely theory is that the system clock was out of whack, and VC++ did not notice the change, and failed to recompile one or more source modules.
Originally Posted by Sharke
You probably could have gotten away with a Clean following by a recompile. If file timestamps get out of sync, the build process will go wrong, and that isn't Visual Studio's fault. (Not that I'm defending it.)
Aha, I was not aware of the clean build command.