Y
Hacker News
new
|
ask
|
show
|
jobs
by
andijcr
1910 days ago
for the first one, there is no direct equivalent, but you can directly loop over any [Derived] collection as a reference to [Base]
1 comments
s3cur3
1910 days 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>.
link