[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stl constructs inside the union block
From: |
Randy Smith |
Subject: |
stl constructs inside the union block |
Date: |
Tue, 02 Oct 2007 16:48:05 -0500 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070728) |
I'm trying to incorporate c++ stl constructs into the %union { } block
of yacc. Specifically, I'm trying to do something similar to this:
%union {
...
std::list<unsigned int>* int_list;
...
}
This yields the error:
eidd.y:100: error: using-declaration for non-member at class scope
eidd.y:100: error: expected `;' before '<' token
One solution to this (and the solution I used), is to define
a simple class that wraps a pointer of this type. This works fine, but
it is a bit of a kludge, and I'm really curious why the direct stl
reference doesn't work. Can anybody explain this to me or point me to
a reference?
Thanks,
Randy smith
- stl constructs inside the union block,
Randy Smith <=