Christof Meerwald@freec++.prog | |||||
Empty Base Class Optimizationsee The "Empty Member" C++ Optimization. struct A { }; struct B : public A { int i; }; int main(int argc, char *argv[]) { B b; return !(static_cast<void *>(&b) == static_cast<void *>(&b.i)); } | |||||
This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.
Revision: 1.4, cmeerw.org/prog/freecpp/empty_base_opt.html Last modified: Mon Sep 03 18:20:50 2018 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |