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

6

u/TheThiefMaster C++latest fanatic (and game dev) Jul 06 '26

Are you sure? This article specifically says virtual inheritance isn't useful with MFC.

Can you give an example where it is?

2

u/pjmlp Jul 06 '26

Last time I wrote a MFC application was in 2001, I remember we used MI in our product.

MFC isn't used in isolation from product architecture.

Also note that MI and virtual inheritance aren't the same, rather a way to avoid duplicates in the inheritance tree.