Hacker News new | ask | show | jobs
by flohofwoe 663 days ago
Yeah, but is that a good thing? Complex template magic is hardly one of the good parts of modern C++.
2 comments

Rust generics are much underpowered than C++ templates in order to make them an integral part of type system. Many practical C++ programmers avoid excessive template magics for that reason and also for simplicity, and Rust's restriction is essentially its codification.
But it's not template magic. Not even something close.

It's just nested generic types.

How would you otherwise express all the constrains in a type?