Limit of multiple inheritance in C++
问题 What is the limit of multiple inheritance in C++? i.e, how many classes can a class inherit from? Is it implementation dependent or is there a constraint placed on the number of classes you can inherit from in multiple inheritance? 回答1: It's implementation defined. C++11 gives recommended minimums in the Implementation quantities section of the standard: — Direct and indirect base classes [16 384]. — Direct base classes for a single class [1 024]. [...] — Direct and indirect virtual bases of