mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Roll back cb198413 re MSVC __cplusplus macro
Commit cb19841358 "Work around MSVC's
__cplusplus regarding C++11" did not fix compiler errors with older MSVC
versions as hoped.
This commit is contained in:
1 parent
025f9c208e
commit
824b87bb86
4 files changed
+58
-68
No files matched your search
@@ -32,14 +32,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
// MSVC before Visual Studio 2017 mis-reported the __cplusplus level:
|
||||
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
|
||||
// We just assume that ifdef __cplusplus, MSVC implies C++11 or later. Note
|
||||
// that MSVC doesn't support "#warning" and Clang also defines __GNUC__.
|
||||
#if (__cplusplus >= 201103L) || defined(_MSC_VER)
|
||||
#define WUFFS_HAS_CPP11
|
||||
#if __cplusplus >= 201103L
|
||||
#include <memory>
|
||||
#elif defined(__GNUC__)
|
||||
#else
|
||||
#warning "Wuffs' C++ code requires -std=c++11 or later"
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user