[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: std::vector in the union
From: |
Akim Demaille |
Subject: |
Re: std::vector in the union |
Date: |
24 Jul 2002 17:28:55 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
| Hi,
| I'm using yacc to parse a file.
|
| In my case, I would like to include some vectors from stl in the union.
| But, I can't because, in a union, you cannot have members with copy
| constructors.
|
| So, I tried :
|
| typedef union
| {
| int iVal;
| double fVal;
| std::vector<MyObject*> objectsVal;
| } YYSTYPE;
| typedef union
| {
| int iVal;
| double fVal;
| std::vector<MyObject> *objectsVal;
^
| } YYSTYPE;