On Thu, Feb 12, 2026 at 2:08 PM David Brown via Std-Proposals <std-proposals@lists.isocpp.org> wrote:



An alternative solution would be if there were support in C++ for truly
zero-overhead tag types.  A "tag type" is a class type that contains no
data, generally has no methods, and is used primarily for distinguishing
overloads.  My "tagged" functions could be handled making a tag type
such as "irq_disabled" with a non-public constructor - you only get to
create one with the type's friend "disable_interrupts()" function.
Functions that should only be called with the interrupts disabled, will
then take an "irq_disabled" parameter.

Probably not the most elegant solution, but providing the tag as template parameter would have zero runtime-overhead.