Class AllowUIntAsIndex

Class AllowUIntAsIndex#

Class Documentation#

class AllowUIntAsIndex#

Scoped no-overflow assumption for unsigned index arithmetic.

Unsigned arithmetic normally wraps modulo 2^bits. Use With<AllowUIntAsIndex> only when unsigned values are guaranteed not to overflow, enabling the analyzer’s index rewrites within that scope. The assumption is off by default, thread-local, and supports nested scopes. Constructing this context alone does not enable the assumption.

Public Static Functions

static bool Enabled()#

Check the current thread’s unsigned-index assumption.

Returns:

True inside an active With<AllowUIntAsIndex> scope.