[[fallthrough]] is only supported by VC15/2017 when /std:c++latest is used.
This commit is contained in:
parent
8cc8c5c16d
commit
03d39d6279
1 changed files with 4 additions and 0 deletions
|
@ -73,8 +73,12 @@
|
|||
// Some sources claim MSVC 2015 supports them, but let's be safe...
|
||||
#if _MSC_VER >= 1910
|
||||
#define DEPRECATED(reason) [[deprecated(reason)]]
|
||||
#if _MSVC_LANG > 201402 // fallthrough only supported when MSVC targets later than C++14
|
||||
#define FALLTHROUGH [[fallthrough]]
|
||||
#else
|
||||
#define FALLTHROUGH
|
||||
#endif
|
||||
#else
|
||||
#define DEPRECATED(reason) __declspec(deprecated)
|
||||
#define FALLTHROUGH
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue