Why won't gcc compile a class declaration as a reference argument?
Posted
by Jorge
on Stack Overflow
See other posts from Stack Overflow
or by Jorge
Published on 2010-03-27T19:27:12Z
Indexed on
2010/03/27
19:33 UTC
Read the original article
Hit count: 169
This compiles fine in Visual studio, but why not in XCode?
class A()
{};
someMethod(A& a);
someMethod(A()); //error: no matching function call in XCode only :(
Is this bad form? it seems annoying to have to write the following every time:
A a();
someMethod(a); //successful compile on Xcode
Am i missing something? I am not very experienced so thank you for any help!
© Stack Overflow or respective owner