On Wed, Mar 4, 2009 at 2:29 PM, Hicham Mouline
<hicham@mouline.org> wrote:
Whether the compiler prints sizeof(myType) as 1byte or something else has no bearing
on whether it doesn't create an instance at runtime, right?
need to read their docs (though it's quite hard to see where for g++ for e.g.)
Yes that's true. But nobody will give you a definite answer by referencing to the C++ Standard. This is a really compiler dependent issue.
What you can do is inspecting the function signatures created in your compiler's binary output. If you have an overload with 2 parameters, than it means compiler applied some sort of optimization, otherwise, it will pass and instance of the object, since the function with 2 parameters is simply not there ;)
thanks very much,
You are welcome