Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Compatibility.h @ 4350:e457c30970cf
fix ORTHANC_DEPRECATED macro for C++14
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 06 Dec 2020 13:16:27 +0100 |
parents | ce9284aebd40 |
children | d300ace4acad |
comparison
equal
deleted
inserted
replaced
4349:85237ae3a076 | 4350:e457c30970cf |
---|---|
32 # error Please support your compiler here | 32 # error Please support your compiler here |
33 #endif | 33 #endif |
34 | 34 |
35 | 35 |
36 // Macro "ORTHANC_DEPRECATED" tags a function as having been deprecated | 36 // Macro "ORTHANC_DEPRECATED" tags a function as having been deprecated |
37 #if __cplusplus >= 201402L // C++14 | 37 #if (__cplusplus >= 201402L) // C++14 |
38 # define ORTHANC_DEPRECATED [[deprecated]] | 38 # define ORTHANC_DEPRECATED(f) [[deprecated]] f |
39 #elif defined(__GNUC__) || defined(__clang__) | 39 #elif defined(__GNUC__) || defined(__clang__) |
40 # define ORTHANC_DEPRECATED __attribute__((deprecated)) | 40 # define ORTHANC_DEPRECATED(f) f __attribute__((deprecated)) |
41 #elif defined(_MSC_VER) | 41 #elif defined(_MSC_VER) |
42 # define ORTHANC_DEPRECATED __declspec(deprecated) | 42 # define ORTHANC_DEPRECATED(f) f __declspec(deprecated) |
43 #else | 43 #else |
44 # define ORTHANC_DEPRECATED | 44 # define ORTHANC_DEPRECATED |
45 #endif | 45 #endif |
46 | 46 |
47 | 47 |