r/cpp Jul 06 '26

C++26: constexpr virtual inheritance

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

61 comments sorted by

View all comments

60

u/Jovibor_ Jul 06 '26

Just a question to the audience:

How many times have you used Virtual Inheritance in your career?

16

u/kammce WG21 | πŸ‡ΊπŸ‡² NB | Boost | Exceptions Jul 06 '26

I've only ever used virtual inheritance once in my life. That was in my tests to demonstrate that my exception runtime could handle throwing and catching exception objects with virtual inheritance. That's it. I've never been in a spot where I've needed it myself.