libtorrent version (or branch): 2.0.10
platform/architecture: x86_64 GNU/Linux
compiler and compiler version: clang-19 w/ libc++-19
Clang check -Wdeprecated-redundant-constexpr-static-def, when compiling in C++17 or greater, emits many warnings, such as:
libtorrent-src/src/alert.cpp:72:36: warning: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Wdeprecated-redundant-constexpr-static-def]
72 | constexpr alert_category_t alert::error_notification;
| ^
The warnings could be easily silenced by checking the __cplusplus preprocessor macro:
#if __cplusplus < 201703L
// define constexpr static data members
#endif
Please provide the following information
libtorrent version (or branch): 2.0.10 platform/architecture: x86_64 GNU/Linux compiler and compiler version: clang-19 w/ libc++-19
Clang check
-Wdeprecated-redundant-constexpr-static-def
, when compiling in C++17 or greater, emits many warnings, such as:The warnings could be easily silenced by checking the
__cplusplus
preprocessor macro:I can submit a patch if needed.
Thank you!