C++, I love this language, is it the best one? I don't know, I don't care much, all I know it's the one I have the most fun with and always something left to learn...
Today, I wrote this simple code that open my eyes wide and hit my head on my desk a couple of time.
But unfortunately I have got an error:
error C2660: 'MyClass' : function does not take 2 arguments.
I have to say that when the code is simplified to this extreme, it's quite easier to understand what is happening: MyClass isn't a Class instance, it is a function declaration that takes a glm::vec2 is parameter and return a Class. This is because of the cast from glm::vec3 to glm::vec2.
Thanks to Thomas Thiriez, the C++ God I asked for deep and accurate answers. He even gives me a perfect reference about this C++ twist.