math_adapter/meta/
for_each.rs1#![ allow( unused_macros ) ]
2#![ allow( unused_imports ) ]
3
4pub( crate ) mod private
6{
7
8 #[ macro_export ]
13 macro_rules! for_each_int
14 {
15
16 (
17 $Callback : path
18 $( where $( $Args : tt )* )?
19 ) =>
20 {
21 $crate::for_each!
22 (
23 $Callback where
24 $( $( $Args )* )?
25 @Each isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128
26 );
27 };
28
29 }
30
31 #[ macro_export ]
36 macro_rules! for_each_float
37 {
38
39 (
40 $Callback : path
41 $( where $( $Args : tt )* )?
42 ) =>
43 {
44 $crate::for_each!
45 (
46 $Callback where
47 $( $( $Args )* )?
48 @Each f32 f64
49 );
50 };
51
52 }
53
54 #[ macro_export ]
59 macro_rules! for_each_number
60 {
61
62 (
63 $Callback : path
64 $( where $( $Args : tt )* )?
65 ) =>
66 {
67 $crate::for_each!
68 (
69 $Callback where
70 $( $( $Args )* )?
71 @Each isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 f32 f64
72 );
73 };
74
75 }
76
77 pub use for_each_int;
80 pub use for_each_float;
81 pub use for_each_number;
82
83}
84
85crate::mod_interface!
87{
88 orphan use
89 {
90 for_each_int,
91 for_each_float,
92 for_each_number,
93 };
94}