Skip to content

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

@emmenlau

Description

@emmenlau

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions