Thread View: comp.std.c++
1 messages
1 total messages
Started by Claus A. Faerber
Mon, 19 Feb 1996 02:01
Re: Give operator. a chance
Author: Claus A. Faerber
Date: Mon, 19 Feb 1996 02:01
Date: Mon, 19 Feb 1996 02:01
33 lines
1854 bytes
1854 bytes
Jerry Coffin <jcoffin@rmii.com> (08 Feb 96): > claus@faerber.muc.de (Claus A. Faerber) wrote: > > >IMO there's a better way than 'operator.()': > > >Simply say: 'If a class member identifier is not found > >within an object, all possible cast operators are scanned in the order of declaration > >order to find a conversion to an object of a class > >containing a member with this identifier.' > > Which would be chosen if two or more possibilities would work? In the order in which the cast operators appead in the class definition. And cast-to classes should be scanned in the same manner as the original class in order to find the member, ie. if one class the object is casted to doesn't contain the member, but a cast op. to a class, which contains it, this path is choosen instead of the next cast of the original class. Claus ------------------------------------------------------------------------ Claus Andre Faerber - claus@faerber.muc.de - http://www.muc.de/~cfaerber ------------------------------------------------------------------------ --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. Moderation policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads