thanks interesting insights. It seems initializer lists are not designed to pass by reference. Two other cases that are maybe more optimal if you avoid lvalues... Use move (if you have a move ctor): UInit c{std::move(a), std::move(b)}; Use temporaries to make the init list. maybe more the original thinking behind the concept: Uinit d{Unit(), Unit()}; //default, default, init list
thanks interesting insights. It seems initializer lists are not designed to pass by reference. Two other cases that are maybe more optimal if you avoid lvalues...
Use move (if you have a move ctor):
UInit c{std::move(a), std::move(b)};
Use temporaries to make the init list. maybe more the original thinking behind the concept:
Uinit d{Unit(), Unit()}; //default, default, init list
I agree, initializer lists are not designed to pass by reference. They are a view and not a container.
Great content! Thanks for sharing. I wish the font was larger.
Thank you! I may have increased the font in more recent episodes. I can see whether there is enough space to increase the font a bit more.
very small font we can't see nothing , please next time make font much bigger
that's crazy! wow, initializer_list is so broken