[[fallthrough]] is only supported by VC15/2017 when /std:c++latest is used.

This commit is contained in:
Wedge009 2017-05-06 23:17:18 +10:00
parent 8cc8c5c16d
commit 03d39d6279

View file

@ -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