imneme / pcg-cpp

PCG — C++ Implementation
Apache License 2.0
745 stars 99 forks source link

Enable empty base class optimization on MSVC #66

Open melak47 opened 3 years ago

melak47 commented 3 years ago

MSVC implements empty base class optimization only as an opt-in (see https://devblogs.microsoft.com/cppblog/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/).

Because of this, the tests fail on MSVC as the engines are larger than expected. By using the attribute to opt-in to EBCO, the engines are of the expected sizes.