You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MSVC 10 (and presumably the previous versions as well) will compile the following without errors
#include <stddef.h>
struct arbitrary_t {} arbitrary;
void * operator new(size_t size, arbitrary_t);
int main() {
int * p = new(arbitrary) int[4];
}
On the other hand, clang will (correctly) report
test.cpp:7:15: error: no matching function for call to 'operator new[]'
int * p = new(arbitrary) int[4];
^ ~~~~~~~~~~~
Unfortunately, the header in MS's WDK only contains the non-array version of operator new(std::size_t, std::nothrow), which prevents anything that depends on WDK from being buildable with clang.
The text was updated successfully, but these errors were encountered:
Extended Description
MSVC 10 (and presumably the previous versions as well) will compile the following without errors
On the other hand, clang will (correctly) report
Unfortunately, the header in MS's WDK only contains the non-array version of operator new(std::size_t, std::nothrow), which prevents anything that depends on WDK from being buildable with clang.
The text was updated successfully, but these errors were encountered: