Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC compiler dll export warning 4275 with format_error #3424

Closed
ToddWilsonBertec opened this issue May 10, 2023 · 2 comments
Closed

MSVC compiler dll export warning 4275 with format_error #3424

ToddWilsonBertec opened this issue May 10, 2023 · 2 comments

Comments

@ToddWilsonBertec
Copy link

Previously, the macro FMT_CLASS_API was suppressing the 4275 warning message when format_error was declared. Since this has been removed, the format_error decl vomits a bunch of warnings when compiled with MSVC.

To fix, change:

class FMT_API format_error : public std::runtime_error {

to

class FMT_API format_error : FMT_MSC_WARNING( suppress : 4275 ) public std::runtime_error {

@vitaut
Copy link
Contributor

vitaut commented May 10, 2023

I don't think format_error even needs to be exported considering that it doesn't have any methods of its own. We could probably drop FMT_API from it.

@vitaut
Copy link
Contributor

vitaut commented May 17, 2023

Should be worked around in e0fc0e8.

@vitaut vitaut closed this as completed May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants