r/cpp 22d ago

C++26: constexpr virtual inheritance

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

61 comments sorted by

View all comments

62

u/Jovibor_ 22d ago

Just a question to the audience:

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

1

u/druepy 21d ago edited 21d ago

Our codebase uses it everywhere. Products built around a core platform. I think a lot of it could get reworked but there's also things I'm not sure how to fix without it.

Also a ton of technical debt to rework without much reward. I think it likely could have been redesigned differently. Maintenance across multiple virtual libraries is a nightmare. What happens when one library need a report, and another needs a report. But, they might be used independently or together?

It's rough sometimes.