default_fn! macro

This commit is contained in:
Norbert Nemec 2019-09-01 20:23:16 +02:00
parent bfaec62c87
commit fde164293b

View file

@ -17,6 +17,16 @@
#![macro_use]
#[cfg(feature = "specialization")]
macro_rules! default_fn {
{ $($tt:tt)* } => { default fn $( $tt )* };
}
#[cfg(not(feature = "specialization"))]
macro_rules! default_fn {
{ $($tt:tt)* } => { fn $( $tt )* };
}
/// Generates a binary operator implementation for the permutations of by-ref and by-val
macro_rules! impl_operator {
// When it is an unary operator