> > Since you advocate elsewhere that exception classes be derived > > from std::exception, the answer is because otherwise LSP would > > be violated. > > You can't access the derived class' assignment operator through a > pointer/reference to a polymorphic base, so that point is moot.
Well, you're the expert on this. (I thought you could catch a reference to an exception, dynamic_cast it downwards, then use the assignment operator. Sure, this would be a stupid thing to do, but if possible I certainly can imagine some few misguided souls who haven't yet grokked C++ exception handling doing so.) > LSP is weird anyway. What's the point of polymorphism if you're not > going to change the behavior of the class in some observable way? If > the derived class were transparently substitutable for the base class > it wouldn't be much good, would it? I disagree here; "transparently substitutable" != "observable behaviour is identical". Dave _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost