This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mutually-recursive types and an old puzzle
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Gabriel Dos Reis <gdr at acm dot org>
- Cc: Chris Lattner <sabre at nondot dot org>, gcc at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 17:53:56 -0700
- Subject: Re: mutually-recursive types and an old puzzle
- References: <Pine.LNX.4.44.0406291930070.1537-100000@nondot.org> <32877.::ffff:128.194.146.36.1088556186.squirrel@webmail.nerim.net>
On Wed, Jun 30, 2004 at 02:43:06AM +0200, Gabriel Dos Reis wrote:
> Yes, C does not has a fixpoint combinator. C++ does.
>
> struct T {
> T operator()() const { return T(); }
> };
That doesn't quite suffice, but it looks like it can be made to do so (we
need a set of function-objects that can return references to each other).