mirror of
https://github.com/bspeice/speice.io
synced 2024-12-22 16:48:10 -05:00
std::initializer_list
This commit is contained in:
parent
5ba3978f2c
commit
3e4760a727
@ -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
|
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
|
an optimizing compiler: https://stackoverflow.com/a/36919571
|
||||||
|
|
||||||
# Potentially excluded
|
Also: `std::initializer_list` (although Rust can get _very_ close with macros: `vec!`).
|
||||||
|
|
||||||
Some ideas related to traits, but that I'm not sure sufficiently fit the theme. May be worth
|
|
||||||
investigating in a future post?
|
|
||||||
|
|
||||||
# CRTP
|
# CRTP
|
||||||
|
|
||||||
@ -713,6 +710,11 @@ Review of the examples Wikipedia gives:
|
|||||||
data.
|
data.
|
||||||
- Polymorphic chaining: Feel free to return `Self`, `&Self`, etc., builder patterns aren't new.
|
- 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
|
## Visibility
|
||||||
|
|
||||||
Worth acknowledging that C++ can do interesting things with `protected`, `friend`, and others, that
|
Worth acknowledging that C++ can do interesting things with `protected`, `friend`, and others, that
|
||||||
|
Loading…
Reference in New Issue
Block a user