normalizeCppReturnType: smart-pointer/optional unwrap.
()
| 122 | } |
| 123 | /// normalizeCppReturnType: smart-pointer/optional unwrap. |
| 124 | fn ret_wrapper_re() -> &'static Regex { |
| 125 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 126 | RE.get_or_init(|| { |
| 127 | Regex::new(r"\b(?:std\s*::\s*)?(?:unique_ptr|shared_ptr|weak_ptr|optional)\s*<\s*([^,>]+?)\s*>") |
| 128 | .unwrap() |
| 129 | }) |
| 130 | } |
| 131 | fn ret_keyword_re() -> &'static Regex { |
| 132 | static RE: OnceLock<Regex> = OnceLock::new(); |
| 133 | RE.get_or_init(|| Regex::new(r"\b(?:const|volatile|typename|struct|class|enum)\b").unwrap()) |
no test coverage detected