|
|
|
|
|
by MaulingMonkey
3536 days ago
|
|
> So the question is, if this "safer" implementation supported "y_iter.hasNext()", would it be better for it to throw an exception (or whatever) in this case, or just return false? The safest option is to compile this code as Rust and have it fail to satisfy the borrow checker. And basic syntax parsing because this is C++ - but ehh, details. Certain static analysis tools may also catch the issue. Well, if you're using real C++ iterators and not ::hasNext at least. |
|