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

Visual Studio 2017 warning #1784

Closed
petko opened this issue Oct 8, 2019 · 3 comments
Closed

Visual Studio 2017 warning #1784

petko opened this issue Oct 8, 2019 · 3 comments
Labels
solution: invalid the issue is not related to the library

Comments

@petko
Copy link

petko commented Oct 8, 2019

With release 3.7.0, in VS2017 (15.9.16), I get the following error when using the library in my tests (it is reported as error, but the projects builds OK):

Severity	Code	Description	Project	File	Line	Suppression State
Error (active)	E2512	the argument to a feature-test macro must be a simple identifier	Tests	[path]\json.hpp	1274	

I hope it's not a duplicate, but haven't found it reported..

@petko petko added the kind: bug label Oct 8, 2019
@t-b
Copy link
Contributor

t-b commented Oct 8, 2019

I'm seeing that as well.

The line in question is

#if \
(__cplusplus >= 201703L) || \
((__cplusplus >= 201103L) && JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough))
#define JSON_HEDLEY_FALL_THROUGH [[fallthrough]]
#elif (__cplusplus >= 201103L) && JSON_HEDLEY_HAS_CPP_ATTRIBUTE(clang::fallthrough)
#define JSON_HEDLEY_FALL_THROUGH [[clang::fallthrough]]
#elif (__cplusplus >= 201103L) && JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0)
#define JSON_HEDLEY_FALL_THROUGH [[gnu::fallthrough]]
#endif
#endif
#if !defined(JSON_HEDLEY_FALL_THROUGH)

and that is a verbatim copy from
https://github.com/nemequ/hedley/blob/c395642679d4b79cd54d4f4a3ecb21fdf544513e/hedley.h#L1171-L1181.

So I think that bug should be actually reported to https://github.com/nemequ/hedley.

@nlohmann
Copy link
Owner

nlohmann commented Oct 9, 2019

I agree. This issue is not related to this library, but to Hedley.

@nlohmann nlohmann closed this as completed Oct 9, 2019
@nlohmann nlohmann added solution: invalid the issue is not related to the library and removed kind: bug labels Oct 9, 2019
@nlohmann
Copy link
Owner

Closed with #1799.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

3 participants