Commit 722877a
Add RustyHash adapter and include try.hpp in parity runner
RustyHash<K> (include/rusty/hashmap.hpp):
- Generic hash adapter for rusty::HashMap default hash parameter
- Uses std::hash<K> when available (SFINAE specialization)
- Falls back to K::hash() method (transpiled Rust #[derive(Hash)])
- Last resort: FNV hash of raw bytes
- Fixes: std::hash<ArrayString<16>>::~hash() deleted error
HashMap default hash changed from std::hash<K> to RustyHash<K>.
This lets transpiled types with .hash() methods work as HashMap keys
without requiring explicit std::hash specializations.
Runner generation (transpiler/src/main.rs):
- Added #include <rusty/try.hpp> for RUSTY_TRY/RUSTY_CO_TRY macros
- Fixes: RUSTY_TRY not declared in scope error
716 transpiler tests + 19 C++ io tests, all passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 66d08ca commit 722877a
2 files changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
13 | 46 | | |
14 | 47 | | |
15 | 48 | | |
| |||
141 | 174 | | |
142 | 175 | | |
143 | 176 | | |
144 | | - | |
| 177 | + | |
145 | 178 | | |
146 | 179 | | |
147 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
1317 | | - | |
| 1317 | + | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
| |||
0 commit comments