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 C4355 warning #1622

Closed
jbuechner opened this issue Apr 9, 2020 · 2 comments
Closed

MSVC C4355 warning #1622

jbuechner opened this issue Apr 9, 2020 · 2 comments

Comments

@jbuechner
Copy link

When compiling format.cc or when using fmt::format inside other projects, MSVC reports a C4355 for

: Handler(handler), checker_(*this, arg_type) {}
and
: Handler(other), checker_(*this, other.arg_type_) {}

examplary compiler output

format.h(2148,1): error C4355: 'this': used in base member initializer list (compiling source file format.cc)

For our own projects we treat this warning as error.

I would like to suppress the warning inside the format.h file and can prepare a pull request for the required change.

@vitaut
Copy link
Contributor

vitaut commented Apr 9, 2020

A PR is welcome but please make sure that the warning is fixed/suppressed locally. This can be done by hiding this behind an accessor.

vitaut added a commit that referenced this issue Apr 11, 2020
vitaut added a commit that referenced this issue Apr 11, 2020
vitaut added a commit that referenced this issue Apr 11, 2020
@vitaut
Copy link
Contributor

vitaut commented Apr 11, 2020

Fixed in e30d839.

@vitaut vitaut closed this as completed Apr 11, 2020
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