Le code n’est valable qu’a partir de C++ 17. Le compilateur gcc 9.3 ne compile par en C++17 par défaut à priori.
(/home/J0039644/src/zeste)===> gdb -quiet ./a
Reading symbols from ./a...done.
(gdb) br main
Breakpoint 1 at 0x1004010a5: file main.cpp, line 20.
(gdb) run
Starting program: /home/J0039644/src/zeste/a
[New Thread 6268.0x461c]
[New Thread 6268.0x432c]
[New Thread 6268.0x51e8]
[New Thread 6268.0x5f78]
[New Thread 6268.0x1cc4]
Thread 1 "a" hit Breakpoint 1, main () at main.cpp:20
20 Toto t = f();
(gdb) info source
Current source file is main.cpp
Compilation directory is /home/J0039644/src/zeste
Located in /home/J0039644/src/zeste/main.cpp
Contains 21 lines.
Source language is c++.
Producer is GNU C++14 9.3.0 -mtune=generic -march=x86-64 -g.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.
+0
-0