diff --git a/_posts/2020-08-05-static-polymorphism.md b/_posts/2020-08-05-static-polymorphism.md index 058192a..2d49080 100644 --- a/_posts/2020-08-05-static-polymorphism.md +++ b/_posts/2020-08-05-static-polymorphism.md @@ -694,10 +694,7 @@ the struct, `Vec` can't forward args to this initializer method. That said, open question as to whether the move vs. construct-in-place/placement new matters given an optimizing compiler: https://stackoverflow.com/a/36919571 -# Potentially excluded - -Some ideas related to traits, but that I'm not sure sufficiently fit the theme. May be worth -investigating in a future post? +Also: `std::initializer_list` (although Rust can get _very_ close with macros: `vec!`). # CRTP @@ -713,6 +710,11 @@ Review of the examples Wikipedia gives: data. - Polymorphic chaining: Feel free to return `Self`, `&Self`, etc., builder patterns aren't new. +# Potentially excluded + +Some ideas related to traits, but that I'm not sure sufficiently fit the theme. May be worth +investigating in a future post? + ## Visibility Worth acknowledging that C++ can do interesting things with `protected`, `friend`, and others, that