Topic: operator returning member function
Author: jamshid@emx.cc.utexas.edu (Jamshid Afshar)
Date: 11 Mar 1993 16:01:52 -0600 Raw View
In article <AARo6bhm72@ibs.nsk.su> max@ibs.nsk.su writes:
struct Class;
typedef int (Class::*MemberFunction)(void);
struct Class {
/* .... */
operator MemberFunction(); // possible without a typedef?
}
>[...] The way to read and write in this truly
>hieroglyphical notation is given in Kernighan&Ritchie's book. Let's
>try:
Because an `operator' conversion function declaration is so different
from a C function declaration, I think we should instead be looking at
the C++ grammar given in the ARM and CPL2.
>1. What we need is a type cast:
> operator <some type> ();
Author: jimad@microsoft.com (Jim Adcock)
Date: 15 Mar 93 23:20:44 GMT Raw View
In article <1nocsgINN82f@emx.cc.utexas.edu> jamshid@emx.cc.utexas.edu (Jamshid Afshar) writes:
|What's wrong with the grammar in the ARM and CPL2?
Its a very loose upper bound. IE it permits many things that
you and I would consider obvious syntax errors.