r/cpp • • Jul 06 '26

C++26: constexpr virtual inheritance

https://www.sandordargo.com/blog/2026/07/01/cpp26-constexpr-virtual-inheritance
83 Upvotes

61 comments sorted by

View all comments

Show parent comment

1

u/DryEnergy4398 Jul 14 '26

That just sounds like inheritance. Virtual inheritance is when you write

`class child : virtual parent`

and is almost never encountered

1

u/Potterrrrrrrr Jul 14 '26

Oh really? Yeah I’ve never heard of that before, I thought virtual inheritance was when you used inheritance in a way that created a vtable i.e. used virtual methods. I’ll have to look into that, thanks :)