#constant #wrapper #type #const

no-std integral_constant

Type-level wrappers around constant values

1 unstable release

0.1.0 Sep 18, 2023

#452 in No standard library


Used in fixed-typed-arena

Apache-2.0

6KB

integral_constant

This crate provides type-level representations of constant values. The name integral_constant is a reference to std::integral_constant in C++, which serves a similar purpose. Unlike std::integral_constant, this crate provides separate wrapper types depending on the type of the constant value, since the type of const generics in Rust cannot depend on type parameters.


lib.rs:

This crate provides type-level representations of constant values. The name integral_constant is a reference to std::integral_constant in C++, which serves a similar purpose. Unlike std::integral_constant, this crate provides separate wrapper types depending on the type of the constant value, since the type of const generics in Rust cannot depend on type parameters.

No runtime deps