型引数に値を渡すやつがまだ unstable ですね >C++ でできて Rustでできないこと
あと高階型パラメータ (GAT) みたいなのも、 C++ では template template で実現できるけど Rust では unstable ですね
いやこれ嘘だ、 GAT は associated type なので型パラメータじゃない
C++ では generic associated type は……たぶんできた気がするけどどうだっけ (たぶんアロケータ周辺を漁るとわかる)
std::allocator - cppreference.com
https://en.cppreference.com/w/cpp/memory/allocator
たぶんこの rebind がそうだと思うんですが:
template< class U > struct rebind { typedef allocator<U> other; };
↑ generic なこれを member type として持てる