Bug 35622 - Cannot declare vector of unordered_maps
Summary: Cannot declare vector of unordered_maps
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 02:29 UTC by Daniel Chen
Modified: 2008-03-30 09:27 UTC (History)
2 users (show)

See Also:
Host: i686-apple-darwin9
Target: i686-apple-darwin9
Build: i686-apple-darwin9
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Chen 2008-03-18 02:29:41 UTC
Cannot declare this:

using namespace std;
vector< tr1::unordered_map<int,int> > dsfdsfds;
Comment 1 Wolfgang Bangerth 2008-03-18 05:12:15 UTC
What happens when you do this? And what are the header files you use?
Comment 2 Chris Jefferson 2008-03-18 15:02:08 UTC
#include <vector>
#include <tr1/unordered_map>

using namespace std;

int main(void)
{
  vector<tr1::unordered_map<int,int> > v;
}

Runs fine here, using:

Using built-in specs.
Target: i386-apple-darwin9.2.0
Configured with: ../gcc/configure --enable-languages=c,c++ --prefix=/Users/caj/gccsvn/
Thread model: posix
gcc version 4.4.0 20080305 (experimental) (GCC) 
Comment 3 Paolo Carlini 2008-03-30 09:27:03 UTC
Really, this is a WORKSFORME, code in Comment #2 is fine everywhere.