Saturday, September 17, 2022

Digest for comp.lang.c++@googlegroups.com - 1 update in 1 topic

Andreas Kempe <kempe@lysator.liu.se>: Sep 17 09:31PM


> To be fair I was talking about containers in general, as far as vector
> is concerned the value_type does need to be at least copyable.
 
> /Flibble
 
Yes. I've written such types myself where I chose an std::list with
emplace to avoid having to make the type moveable or copyable. I
fully understand the need of emplace and that variadic templates are
the way to do it with the current feature set of C++. It was purely
from a readability viewpoint I dislike it.
 
Same thing goes for auto, really. I don't like it because I think it
lessens readability, but there are cases, like overly long iterator
types and templates/lambdas with complex or unknown return types where
it is definitely needed.
 
// Andreas Kempe
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: