*(Mostly based on [this post](https://www.reddit.com/r/rust/comments/5ti9fc/what_can_c_do_that_rust_cant/).)*
***More suggestions and especially answers/corrections are welcome. I plan to read the comments and update the list.***
**Legend:**
* **Question** * ~~Will be solved in the near future~~ * *A feature of debatable usefullness*
**Main:**
* **How advanced is Rust’s `const` compared to `constexpr`? How much of the Standard Library is covered by it? I very much support the modern C++ philosophy of “`constexpr` everything (or as much as the compiler can)”, so I’m interested in how Rust is approaching this.** * ~~Const generics in Stable~~ * ~~Non-integral const generics~~ * **After we get const generics, will C++ templates have any practical advantages over Rust’s generics, apart from variadics? For example, will it be possible to write a Rust version of [`bounded::integer`](https://github.com/davidstone/bounded-integer)?** * *Variadic templates + overloading by arity (no need for [some?] macros?)* * **Does the C++ Stndard Library have anything of use that the Rust one doesn’t?** * *Function overloading (controversial, but there’s a good [argument](https://www.reddit.com/r/rust/comments/5ti9fc/what_can_c_do_that_rust_cant/dk5li7f/) in favour of it, at least if it’s kept limited enough)* * **Can you implement a trait for a whole class of types? For example, all integral types? C++ lets you do that with SFINAE, and C++20 makes it easier and prettier with concepts.** * [Delegation of implementation](https://github.com/rust-lang/rfcs/pull/1406/) (done in C++ with nasty inheritance, but still) * **Is `index` still as limited as [this comment](https://www.reddit.com/r/rust/comments/5ti9fc/what_can_c_do_that_rust_cant/ddmzqng/) says? And how much of a problem is it? I don’t have enough experience with Rust to tell myself.** * *Automatic initialization of objects by field order* * *Internal vtables (an optimization for a common case; if you know the set of functions up-front, you can deal with that more efficiently)* * **How small can Rust executables get with dynamic linking compared to equivalent C++ executables? Does Rust have a stdlib package that you can simply add as a dependency to your dynamically linked programs (just as C++ binaries depend on its own Standard Library shared objects being present in the system), or does it require some black magic? Will non-stable ABI create problems?** * `decltype` * Memory model * Language specification * More existing library support * **Note to self: look over modern C++ features, see if there’s anything useful Rust hasn’t had for ages.**