----- Original Message ----- > http://en.wikipedia.org/wiki/Plain_Old_Data_Structures > > > confirms that POD can't have a vptr :-)
Just because it's not POD in the language doesn't mean that it necessarily requires a static initializer in all implementations: class Interface { public: constexpr Interface() {} virtual int f() = 0; }; class Concrete : public Interface { public: constexpr Concrete() {} virtual int f(); }; Concrete c; run through |g++ -std=c++0x -O2 -o - -S| (gcc 4.6, x86-64) gives: .file "vtables.cpp" .globl c .data .align 8 .type c, @object .size c, 8 c: .quad _ZTV8Concrete+16 No initialization code in sight. clang does the same, with or without the constexpr. -Nathan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform