template <typename T>

struct StrictIntegralType

Defined at line 115 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

This type makes sure that we don't accidentally promote an integral type to

another one. It is only constructible from the exact T type.

Public Methods

template <typename U, cpp::enable_if_t<cpp::is_same_v<U, T>, bool> = 0>
void StrictIntegralType<T> (U value)

Can only be constructed from a T.

Defined at line 120 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

bool operator bool ()

Allows using the type in an if statement.

Defined at line 123 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

StrictIntegralType<T> operator| (const StrictIntegralType<T> & Rhs)

If type is unsigned (bcmp) we allow bitwise OR operations.

Defined at line 126 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

int operator int ()

For interation with the C API we allow explicit conversion back to the

`int` type.

Defined at line 134 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

StrictIntegralType<T> zero ()

Helper to get the zero value.

Defined at line 140 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h

StrictIntegralType<T> nonzero ()

Defined at line 141 of file ../../third_party/llvm-libc/src/src/string/memory_utils/utils.h