Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(const_generics)]
- trait Helper {
- type T;
- }
- struct ITE<True, False, const B: bool> (
- ::core::marker::PhantomData<(True, False)>,
- );
- impl<True, False> Helper
- for ITE<True, False, {true}>
- {
- type T = True;
- }
- impl<True, False> Helper
- for ITE<True, False, {false}>
- {
- type T = False;
- }
- fn foo<const B: bool>() {
- let a: <ITE<(), (), {B}> as Helper>::T;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement