NamedType icon indicating copy to clipboard operation
NamedType copied to clipboard

sizeof(Meter) != sizeof(double) with Visual Studio 2019

Open emmenlau opened this issue 3 years ago • 3 comments

Thanks for the excellent library! I've added NamedType to our CI and enabled the tests, but the tests fail with Visual Studio 2019 16.7.7 (current latest). I've tested with both the MSVC compiler and the supplied ClangCl. The error I get is:

1: C:\gitlabci\NamedType\test\tests.cpp(504): FAILED:
1:   REQUIRE( sizeof(Meter) == sizeof(double) )
1: with expansion:
1:   16 == 8
1: 
1: ===============================================================================
1: test cases: 37 | 36 passed | 1 failed
1: assertions: 79 | 78 passed | 1 failed

I've checked the code and as far as I can see FLUENT_EBCO is correctly defined as __declspec(empty_bases). I'm not sure why the sizes may be wrong, then. Any help would be appreciated!

emmenlau avatar Nov 10 '20 18:11 emmenlau