Skip to content

Conversation

linclelinkpart5
Copy link

Adds functionality as requested in #252.

This is done by adding ConstLowerBounded and ConstUpperBounded traits, with associated costs of const MIN: Self and const MAX: Self, respectively. In addition, I also included ConstBounded as a supertrait, and impl'd it for all types that implement ConstLowerBounded + ConstUpperBounded:

pub trait ConstBounded: ConstLowerBounded + ConstUpperBounded {}

impl<T: ConstLowerBounded + ConstUpperBounded> ConstBounded for T {}

These traits have been implemented for all primitive types that the existing Bounded traits have been impl'd for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant