mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
src: use C++14 deprecated attribute for NODE_DEPRECATED
This has been standardized for a while, so there's no real reason not to just use it over compiler-specific alternatives. Signed-off-by: Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/63755 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
1 parent
30595da67b
commit
6d22d373a9
1 file changed
+1
-9
+1
-9
@@ -111,15 +111,7 @@
|
||||
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
||||
# define NODE_DEPRECATED(message, declarator) declarator
|
||||
#else // NODE_WANT_INTERNALS
|
||||
# if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0)
|
||||
# define NODE_DEPRECATED(message, declarator) \
|
||||
__attribute__((deprecated(message))) declarator
|
||||
# elif defined(_MSC_VER)
|
||||
# define NODE_DEPRECATED(message, declarator) \
|
||||
__declspec(deprecated) declarator
|
||||
# else
|
||||
# define NODE_DEPRECATED(message, declarator) declarator
|
||||
# endif
|
||||
#define NODE_DEPRECATED(message, declarator) [[deprecated(message)]] declarator
|
||||
#endif
|
||||
|
||||
// Forward-declare libuv loop
|
||||
|
||||
Reference in new issue
Block a user