Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
andijcr
· 5y ago · 0 comments
for the first one, there is no direct equivalent, but you can directly loop over any [Derived] collection as a reference to [Base]
Comments
[–]
s3cur3
5y ago
True! It’s only an annoyance when you need to pass a std::vector<Derived> to a function that only accepts std::vector<Base>.