Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fcard/typenum-convert
Experimental support for `const_generic_exprs` for the typenum crate.
https://github.com/fcard/typenum-convert
Last synced: 21 days ago
JSON representation
Experimental support for `const_generic_exprs` for the typenum crate.
- Host: GitHub
- URL: https://github.com/fcard/typenum-convert
- Owner: fcard
- Created: 2023-12-22T19:57:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-22T23:16:02.000Z (11 months ago)
- Last Synced: 2023-12-23T21:39:50.203Z (11 months ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Try It
Add this to your Cargo.toml:```
[dependencies.typenum-convert]
git = "https://github.com/fcard/typenum-convert"
branch = "1.0.0"
```# Example
```rs
#![feature(const_generic_exprs)]
#![allow(incomplete_features)]use typenum_convert::*;
use typenum::{U4, Unsigned};
use std::ops::Add;fn main() {
type Four = U4;
type Eight = T32<{2 * Four::U32}>;
type Twelve = T32<{Eight::U32 + Four::U32}>;
println!("{} {} {}",
Four::U32, Eight::U32, Twelve::U32);
}
```