Hiya,
For legacy/backcompat reasons MSVC doesn't automatically perform empty-base optimization, and requires you to opt-in using the empty_bases declspec.
This means the following code fails to compile on MSVC (but passes on GCC and Clang):
#include <strong_type/strong_type.hpp>
using myint = strong::type<int, struct my_int_>;
static_assert(sizeof(myint) == sizeof(int));
I have a patch to fix this locally, would you like it contributed as a PR? Edit: #61
Hiya,
For legacy/backcompat reasons MSVC doesn't automatically perform empty-base optimization, and requires you to opt-in using the
empty_basesdeclspec.This means the following code fails to compile on MSVC (but passes on GCC and Clang):
I have a patch to fix this locally, would you like it contributed as a PR?Edit: #61