Consider a Movable file handle.
File fh = File(fopen("file.txt"));
foo(std::move(fh));
Using fh after foo() would yield a compile error in Rust. It does not in C++.
2 karma · joined October 31, 2014
File fh = File(fopen("file.txt"));
foo(std::move(fh));
Using fh after foo() would yield a compile error in Rust. It does not in C++.