@@ -57,6 +57,8 @@ void * operator new[](std::size_t size) {
5757}
5858
5959void * operator new (std::size_t size, const std::nothrow_t tag) noexcept {
60+ // Prevent an 'unused parameter' warning
61+ static_cast <void >(tag);
6062#if defined(NEW_TERMINATES_ON_FAILURE)
6163 // Cannot call throwing operator new as standard suggests, so call
6264 // new_helper directly then
@@ -66,6 +68,8 @@ void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
6668#endif
6769}
6870void * operator new [](std::size_t size, const std::nothrow_t & tag) noexcept {
71+ // Prevent an 'unused parameter' warning
72+ static_cast <void >(tag);
6973#if defined(NEW_TERMINATES_ON_FAILURE)
7074 // Cannot call throwing operator new[] as standard suggests, so call
7175 // malloc directly then
@@ -101,9 +105,13 @@ void operator delete[](void * ptr, std::size_t size) noexcept {
101105#endif // __cplusplus >= 201402L
102106
103107void operator delete (void * ptr, const std::nothrow_t & tag) noexcept {
108+ // Prevent an 'unused parameter' warning
109+ static_cast <void >(tag);
104110 operator delete (ptr);
105111}
106112void operator delete[] (void * ptr, const std::nothrow_t & tag) noexcept {
113+ // Prevent an 'unused parameter' warning
114+ static_cast <void >(tag);
107115 operator delete[] (ptr);
108116}
109117
0 commit comments