@@ -57,6 +57,8 @@ void * operator new[](std::size_t size) {
57
57
}
58
58
59
59
void * operator new (std::size_t size, const std::nothrow_t tag) noexcept {
60
+ // Prevent an 'unused parameter' warning
61
+ static_cast <void >(tag);
60
62
#if defined(NEW_TERMINATES_ON_FAILURE)
61
63
// Cannot call throwing operator new as standard suggests, so call
62
64
// new_helper directly then
@@ -66,6 +68,8 @@ void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
66
68
#endif
67
69
}
68
70
void * operator new [](std::size_t size, const std::nothrow_t & tag) noexcept {
71
+ // Prevent an 'unused parameter' warning
72
+ static_cast <void >(tag);
69
73
#if defined(NEW_TERMINATES_ON_FAILURE)
70
74
// Cannot call throwing operator new[] as standard suggests, so call
71
75
// malloc directly then
@@ -101,9 +105,13 @@ void operator delete[](void * ptr, std::size_t size) noexcept {
101
105
#endif // __cplusplus >= 201402L
102
106
103
107
void operator delete (void * ptr, const std::nothrow_t & tag) noexcept {
108
+ // Prevent an 'unused parameter' warning
109
+ static_cast <void >(tag);
104
110
operator delete (ptr);
105
111
}
106
112
void operator delete[] (void * ptr, const std::nothrow_t & tag) noexcept {
113
+ // Prevent an 'unused parameter' warning
114
+ static_cast <void >(tag);
107
115
operator delete[] (ptr);
108
116
}
109
117
0 commit comments