3 ms·
I've seen terrible bugs in the past where there were multiple incompatible versions of a header file in a codebase, but nobody noticed because both headers used
by jstimpfle 6y ago
I've seen terrible bugs in the past where there were multiple incompatible versions of a header file in a codebase, but nobody noticed because both headers used the same guard variable name, so the header that was included first always won.
- ncmncm 6y agoYes, this is the usual failure mode. It happens quite often, because nothing checks for unique or correct guard names. Failing to switch to `#pragma once` when it becomes permissible is reckless and irresponsible.