[variant] a question about recursive typedef

Hello, everyone:
I want write a general linked list(any element in the list may be
a node or nested general linked list, so recursive).
I think general linked list could by defined as following(see spirit's
tutorial mini_xml):
glist = *glist_node
glist_node = node | glist
so here is the typedef according to the above rules:
struct node
{
int data;
};
typedef boost::variant

That cool! Thank you! -----原始邮件----- From: Nathan Ridge Sent: Tuesday, November 08, 2011 10:42 AM Newsgroups: gmane.comp.lib.boost.user To: Boost Mailing List Subject: Re: [variant] a question about recursive typedef
I think this should work:
struct node
{
int data;
};
typedef boost::make_recursive_variant
participants (3)
-
gongyiling
-
Nathan Ridge
-
龚逸玲