Skip to content

[Bug]: wc_static_assert used in header files breaks MSVC/VS2019 C++ compilation #8430

@vaintroub

Description

@vaintroub

Contact Details

[email protected]

Version

5.7.6

Description

First reported in https://jira.mariadb.org/browse/MDEV-36054

Does not happen on MSVC included into VS2022

D:\a\mroonga\mroonga\mariadb\extra\wolfssl\wolfssl\wolfssl/wolfcrypt/error-crypt.h(321,56): error C2429: language feature 'terse static assert' requires compiler flag '/std:c++17'

wc_static_assert((int)WC_LAST_E <= (int)WC_SPAN2_LAST_E);
^
D:\a\mroonga\mroonga\mariadb\extra\wolfssl\wolfssl\wolfssl/wolfcrypt/error-crypt.h(322,51): error C2429: language feature 'terse static assert' requires compiler flag '/std:c++17'
wc_static_assert((int)MIN_CODE_E <= (int)WC_LAST_E);
^
D:\a\mroonga\mroonga\mariadb\extra\wolfssl\wolfssl\wolfssl/wolfcrypt/error-crypt.h(323,61): error C2429: language feature 'terse static assert' requires compiler flag '/std:c++17'
wc_static_assert((int)MIN_CODE_E <= (int)WC_SPAN2_MIN_CODE_E);
^
D:\a\mroonga\mroonga\mariadb\extra\wolfssl\wolfssl\wolfssl/error-ssl.h(244,55): error C2429: language feature 'terse static assert' requires compiler flag '/std:c++17'
wc_static_assert((int)WC_LAST_E <= (int)WOLFSSL_LAST_E);
^

Reproduction steps

compile a C++ file that uses wolfssl 5.7.4, using MSVC included into Visual Studio 2019 without /std:c++17

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions