problem with "typeof" extension (C++)

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Apr 28 15:52:00 GMT 2000


> It may be the case that this is a "documentation bug" rather than a
> "compiler bug"--that is, I may have simply misunderstood how you intend
> "typeof" to be used.  If this is the case, let me _beg_ you to make
> typeof work with the code below.

It's not that much of typeof that gives a problem; it is the use of an
expression that gives problems for the compiler. This is the same
problem as in

template <class F, class X>
struct Ret1 {
  F f;
  X x;
  enum y{a=sizeof( f(x) )};
};

which also should be accepted, but isn't. I've put the report into GNATS.

Regards,
Martin


More information about the Gcc-bugs mailing list