This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

in-class function definitions?


How does the compiler handle an in-class function definition?
Example:

// File A.h

class A {
?int foo(void) { return x; }
?int bar(void);
?int x;

}

// File A.cc
#include "A.h"
int A::bar(void) { ... }

How is "foo()" represented in the AST when parsing A.cc?


Thanks,
rick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]