Thanks, g++. I just absentmindedly wrote a two-argument assert statement in C++,...
Simon Tatham @simontatham@hachyderm.io
Thanks, g++.
I just absentmindedly wrote a two-argument assert statement in C++, because I've got too used to languages like Rust and Python which let you give a reason for the assertion as a separate string argument.
g++ reported two errors:
1. assert only takes one argument! Look at the definition here in <cassert>.
2. The preprocessor output contains a reference to the identifier 'assert', which should have been expanded as a macro. Perhaps you should consider including <cassert>? Look, you can put the include statement here near the top of your source file, right after the include of <cassert>.