std::initializer_list

This commit is contained in:
Bradlee Speice 2020-09-07 02:20:23 -04:00
parent 5ba3978f2c
commit 3e4760a727

View File

@ -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