KiCad PCB EDA Suite
|
A type that is always false. More...
#include <type_helpers.h>
A type that is always false.
Useful for static_asserts, when 'false' is no good as the compiler likes to believe that the assert could pass in some cases:
if constexpr ( something<T>() ) { // Say we know that this branch must always be chosen. } else { // Even if the above if's are made such this branch is never chosen // compilers may still complain if this were to use a literal 'false'. static_assert( always_false<T>::value, "This should never happen" ); }
Definition at line 45 of file type_helpers.h.