4 ms·
It only takes a tiny effort to prove your ignorance with the exact example you gave. https://gcc.godbolt.org/z/x4sbTWxrY https://gcc.godbolt.org/z/x4sbTWxrY
by menaerus 4y ago
It only takes a tiny effort to prove your ignorance with the exact example you gave. https://gcc.godbolt.org/z/x4sbTWxrY https://gcc.godbolt.org/z/x4sbTWxrY
ASM generation compiler returned: 0
Execution build compiler returned: 0
Program returned: 0
/opt/compiler-explorer/gcc-12.2.0/include/c++/12.2.0/bits/stl_vector.h:1320:2: runtime error: applying non-zero offset 18446744073709551612 to null pointer
/opt/compiler-explorer/gcc-12.2.0/include/c++/12.2.0/bits/stl_vector.h:1124:34: runtime error: reference binding to null pointer of type 'value_type'
/app/example.cpp:7:14: runtime error: load of null pointer of type 'value_type'