According to documentation, under /kernel mode:
You must explicitly define the
new()ordelete()operator. The compiler and runtime don't supply a default definition.
Yet, the following code compiles and runs fine without any error.
#include
int main(){
int* xyz = new int[10];
std::cout<<"Hello!";
}
See godbolt link here: https://godbolt.org/z/96MTMcYeT
(Q1) Despite my not doing anything explicit regarding new(), why does the code compile correctly which seemingly goes against the official docs?
(Q2) In godbolt, is there a way to specify linker flags as opposed to just compile flags?