On Friday, 13 February 2015 at 18:47:53 UTC, Daniel Murphy wrote:
"Guillaume Chatelet" wrote in message
news:[email protected]...
I'm not sure I get your point. In C++ classes without vtables
are exactly like structs. Also I don't see any difference
between a struct or a class name mangling on Gnu Linux.
class/struct S{};
S foo();
foo gets mangled "_Z3foov" if S is a struct or a class.
What did I miss ? Do you have compelling examples ?
This is not a good example, because the return type is clearly
not mangled into the function name. (Because you can't
overload on return type.)
void foo(S); should show the problem with some mangling schemes.
You're absolutely right, my bad.
class/struct S {};
void foo(S s){}
foo gets mangled "_Z3foo1S" if S is a struct or a class.