Skip to content

Commit

Permalink
change macro to +
Browse files Browse the repository at this point in the history
  • Loading branch information
bksaiki committed Mar 8, 2024
1 parent a956fea commit fbcb1cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait RoundingContext {
/// associates a groups a set of traits into a single named trait.
#[macro_export]
macro_rules! context_alias {
($id:ident, $t0:ident $(, $ti:ident )* ) => {
($id:ident, $t0:ident $(+ $ti:ident )* ) => {
trait $id: RoundingContext + $t0 $(+ $ti )* {}
impl<T : RoundingContext + $t0 $(+ $ti )*> $id for T {}
};
Expand Down
2 changes: 1 addition & 1 deletion tests/quadratic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use mpmfnum::ieee754::IEEE754Context;
use mpmfnum::ops::*;
use mpmfnum::*;

context_alias!(QuadraticCtx, RoundedNeg, RoundedAdd, RoundedSub, RoundedMul, RoundedDiv, RoundedSqrt);
context_alias!(QuadraticCtx, RoundedNeg + RoundedAdd + RoundedSub + RoundedMul + RoundedDiv + RoundedSqrt);

fn naive_quad<Ctx>(a: &Ctx::Format, b: &Ctx::Format, c: &Ctx::Format, ctx: &Ctx) -> (Ctx::Format, Ctx::Format)
where
Expand Down

0 comments on commit fbcb1cc

Please sign in to comment.