There are cases where one uses an always_false
helper to e.g. cause unconditional static_assert
failure if instantiation of some template is attempted:
To paraphrase Jarod's idea, It could be something like
template struct always_false : std::false_type {};
template <> struct always_false* implementation defined */> : std::true_type{};
Where /* implementation defined */
can be filled by std::_ReservedIdentifer
. User code can't access it, since the identifier is reserved to the library, but there exists a specialization that is true
. That should avoid questions about the ODR and lambdas in specializations.