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 warning C4388 in config.hpp #1581

Open
pwiecz opened this issue Jan 2, 2025 · 0 comments
Open

MSVC warning C4388 in config.hpp #1581

pwiecz opened this issue Jan 2, 2025 · 0 comments

Comments

@pwiecz
Copy link

pwiecz commented Jan 2, 2025

When T in e.g. an int, the comparison here: https://github.com/chriskohlhoff/asio/blob/master/asio/include/asio/impl/config.hpp#L40 compares signed value with an unsigned one, which makes MSVC to raise warning 4388

When executing the path may never be taken because of if (is_unsigned<T>::value), but the if clause is not constexpr so the compiler has to generate code for the branch and raise warning

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

1 participant