From: Grzegorz J. <ja...@ac...> - 2004-08-30 13:39:05
|
Hi! Stefan Seefeld wrote: > as far as I understand, symbol lookup in opencxx works by traversing a > linked list > of 'Environment' objects. However, the C++ lookup rules seem to suggest > at least > a tree, if not a (directed acyclic) graph. Just think about multiple > inheritance > as the most obvious example. > > Am I missing something ? I don't pretend to understand all the details of how it works, but I think there is more to it than you describe. Look at 'SearchBaseOrUsing()', which to my understanding handles the 'forks' in the acyclic graph. Also note that OpenC++ is non-validating, consequently it rightfully ignores, say, ambiguities in multiple inheritance. On the other hand, lookup implementation is missing several features (e.g. ADL). > Does symbol lookup currently work in such cases ? Why not check empirically?... :-) Best regards Grzegorz |