-
-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47a7807
commit e6503fe
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef LIEF_COMPILER_ATTR_H | ||
#define LIEF_COMPILER_ATTR_H | ||
|
||
#if !defined(_MSC_VER) | ||
# if __cplusplus >= 201103L | ||
# define LIEF_CPP11 | ||
# if __cplusplus >= 201402L | ||
# define LIEF_CPP14 | ||
# if __cplusplus >= 201703L | ||
# define LIEF_CPP17 | ||
# if __cplusplus >= 202002L | ||
# define LIEF_CPP20 | ||
# endif | ||
# endif | ||
# endif | ||
# endif | ||
#elif defined(_MSC_VER) | ||
# if _MSVC_LANG >= 201103L | ||
# define LIEF_CPP11 | ||
# if _MSVC_LANG >= 201402L | ||
# define LIEF_CPP14 | ||
# if _MSVC_LANG > 201402L | ||
# define LIEF_CPP17 | ||
# if _MSVC_LANG >= 202002L | ||
# define LIEF_CPP20 | ||
# endif | ||
# endif | ||
# endif | ||
# endif | ||
#endif | ||
|
||
#if defined(__MINGW32__) | ||
# define LIEF_DEPRECATED(reason) | ||
#elif defined(LIEF_CPP14) | ||
# define LIEF_DEPRECATED(reason) [[deprecated(reason)]] | ||
#else | ||
# define LIEF_DEPRECATED(reason) __attribute__((deprecated(reason))) | ||
#endif | ||
|
||
#endif |