タグ付けされた質問 「gcc9」

1
MINGW gccでコンパイルすると、std :: stringに対してオーバーロードされた新しい演算子が呼び出されない
このプログラム(オプションでコンパイル-std=c++17) #include <stdio.h> #include <string> void* operator new(std::size_t nrOfBytes) { printf("allocate %zd bytes on heap\n", nrOfBytes); void* p = malloc(nrOfBytes); if (p) { return p; } else { throw std::bad_alloc{}; } } int main() { // new operator is called when compiled with Clang or MSVS or GCC int* i …
8 c++  gcc  stdstring  gcc9 
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.