[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %union with STL
From: |
Vincent Zweije |
Subject: |
Re: %union with STL |
Date: |
Tue, 26 May 2009 10:30:41 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sun, May 24, 2009 at 06:36:28PM +0200, Hans Aberg wrote:
|| On 22 May 2009, at 20:11, Paritosh Aggarwal wrote:
|| > %{
|| > #include<map>
|| > #include "heading.h"
|| >
|| > using namespace std;
|| >
|| > int yyerror(char *s);
|| > int yylex(void);
|| > %}
|| >
|| > %union
|| > {
|| > pair<const string,int>* it;
|| > int val;
|| > }
|| > compiling this gives the following error: jitparser.y:15: error: ISO
|| > C++
|| > forbids declaration of ‘pair’ with no type
|| > jitparser.y:15: error: expected ‘;’ before ‘<’ token
This message is typical from g++ if you forgot to declare a template type.
|| In the above, make sure the header for std::pair is included -
|| impossible to see from your example.
std::pair is declared in <utility>, so be sure to include that header.
Ciao. Vincent.
--
WCC - Smart Search & Match
NL +31 30 7503222
address@hidden
www.wcc-group.com
signature.asc
Description: Digital signature
- Re: %union with STL, (continued)
- Re: %union with STL, Luca, 2009/05/25
- Re: %union with STL, Hans Aberg, 2009/05/25
- Re: %union with STL, Luca, 2009/05/26
- Re: %union with STL, Hans Aberg, 2009/05/26
- Re: %union with STL, Vincent Zweije, 2009/05/27
- Re: %union with STL, Hans Aberg, 2009/05/27
- Re: %union with STL, Akim Demaille, 2009/05/27
- Re: %union with STL, Hans Aberg, 2009/05/27
- Re: %union with STL, Hans Aberg, 2009/05/29
Re: %union with STL, Hans Aberg, 2009/05/24
- Re: %union with STL,
Vincent Zweije <=