Re: syntax suggestion
David Abrahams <[email protected]>
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Message-ID | <[email protected]> |
Alexander Nasonov <[email protected]> writes: > David Abrahams wrote: > >> Alexander Nasonov <[email protected]> writes: >> >>> Daniel Wallin wrote: >>> >>>> The [] syntax still won't work (IMO) for declaring classes. So you'd end >>>> up with something like: >> >> Not to mention that the []s will bind more closely to public_<B> than >> to the class_ object. > > Oops You can fix that by treating the result of the whole expression as an AST and evaluating it afterwards, but as I said, I worry about the compile-time costs. >>>> Although it looks kind of cool, 'public_' is completely redundant since >>>> we are only interested in accessible bases anyway. >>> >>> Not sure about this. We may need access to protected C++ bases from >>> non-C++ class (I don't know how to implement it elegantly, though). >> >> Actually I think the issue here is that we don't need to represent >> access. Why would the system care whether a base was private or >> protected or public? > > The system could make a decision if its overload resolution algorithm ended > up with a base member function. Members of protected base can be accessed > only from member functions of derived class. Grrr... -- Dave Abrahams Boost Consulting www.boost-consulting.com ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click