Switch from C++11 to C++14/C++17 trouble

Hi All,

Try to switch from C++11 to C++14/C++17 standard and got trouble.

The below is simple test. This test is compiled with C++11 without any errors. And don't compile with C++14 or C++17. I get error:

test.ino:16: undefined reference to `operator delete(void*, unsigned int)'

The test code:

class A {
public:
  void foo(){
    Serial.println( "foo()" );
  }
};

void setup() {
	// put your setup code here, to run once:
	Serial.begin( 9600 );
}

void loop() {
	// put your main code here, to run repeatedly:
  A* a = new A();
  delete a;
}

Of course, I can implement global operator delete(void*,size_t); but I am not sure this is right way.

PS. Arduino version 1.8.13 (Windows)

It looks like something relevant in this change to the core used by the popular MCUdude boards platforms to allow making then transition:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.