Bonjour, je compile un code qui utilise un unordered_set
j'ai bien #include<unordered_set>,
j'ai bien using namespace std;
j'ai bien utilisé le -std=c0x,
par contre j'ai toujours des tas de Symbol 'unordered_set' could not be resolved à la compilation... une idée ?
....
Après avoir cherché un moment je ne vois pas ce qui cloche a ce sujet en tout cas et ça m’empêche d'avancer donc je mets le détail du code si quelqu un a une idée je suis preneur (j'utilise un unordered_set pour ne pas passer ma vie a vérifier que je n'ai pas déjà intégré un nœud donné au graphe).
Il y a certainement d'autres choses qui clochent que mon problème mentionné ci-dessus mais pour l'instant c'est mon principal.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
 
#ifndef GRAPH_H_
#define GRAPH_H_
#include<vector>
#include<iterator>
#include<map>
#include<stack>
#include<queue>
#include<unordered_set>
#include "Node.h"
 
using namespace std;
 
namespace DD {
 
 
template<typename T> class Graph {
public:
	enum Mode {PROPRIETARY, NOCARE}; // S'occupe de la destruction des noeuds (PROPRIETARY) ou pas (NOCARE).
private:
 
 
	bool knowConnex; // Utilisation future
	bool knowCycles; // Utilisation future
	bool hasCycle;   // Utilisation future
	int nConnex;     // Utilisation future
	unordered_set<Node<T>*> nodes; 
//	vector<typename unordered_set<typename Node<T>*> > connexComp;
	Mode mode;
 
public:
 
	Graph() : /*connexComp(vector<typename unordered_set<typename Node<T>*> >() ),*/ knowConnex(false),
			knowCycles(false), nConnex(0), hasCycle(false), mode(NOCARE), nodes(unordered_set<Node<T>*>()){}
	bool empty() const {return nodes.empty();}
 
	Graph(Node<T>* pN) : Graph() {
		insert(pN);
	}
 
	void insert(Node<T>* pN){
		if (nodes.find(pN)==nodes.end()){
		nodes.insert(pN);
		DFIterator dfiterator(pN);
		Node<T>* pNN;
		while (pNN=*(++dfiterator)) {nodes.insert(pNN);}
		}
	}
	void setMode(Mode M){mode = M;}
//	int nCycles() const {return nCycles;}
//	int nConnexComp() const {return nConnex;}
//	virtual bool isTree() const {return (nCycles()==0) && (nConnexComp()==1);}
	virtual ~Graph() {
		if (mode==PROPRIETARY) {
			auto e=nodes.end();
			auto b=nodes.begin();
			for(; b!=e; b++) delete *b;
		}
	}
 
	class DFIterator : public iterator<forward_iterator_tag, Node<T>*>
	{
		Node<T>* pointedNode;
		stack<Node<T>*> nextToVisit;
		map<Node<T>*,bool> marked;
		int nMarked;
 
		void push(const vector<Node<T>*>& v)
		{for(int i=v.size()-1;i>=0;i--) nextToVisit.push(v[i]);}
		void markAndPush()
		{
			marked[pointedNode] = true; nMarked++; push(pointedNode->hookBranches());
		}
	public :
		DFIterator() : pointedNode(0), nextToVisit(stack<Node<T>*>()), marked(map<Node<T>*,bool>), nMarked(0) {}
		DFIterator(Node<T>* N) : DFIterator() {
			if(N!=nullptr){
				pointedNode = N;
				markAndPush();
			}
		}
		DFIterator(vector<Node<T>*>::iterator& i) : DFIterator() {
			poitedNode = *i; markAndPush();
		}
 
		virtual DFIterator operator++(){
			if (!pointedNode==0){
					while(marked[nextToVisit.top()]&&(!nextToVisit.empty())){nextToVisit.pop();}
					if(nextToVisit.empty()){pointedNode=0;}
					else{
						pointedNode=nextToVisit.top(); nextToVisit.pop();
						markAndPush();
					}
			}
			return *this;
		}
		Node<T>* operator *() {return pointedNode;}
		virtual ~DFIterator{}
	};
 
	DFIterator beginDF() {if (!empty()) return DFIterator(*(nodes.begin())); return DFIterator();}
 
	class BFIterator {
		Node<T>* pointedNode;
		queue<Node<T>*> nextToVisit;
		map<Node<T>*,bool> marked;
		int nMarked;
 
		void push(const vector<Node<T>*>& v)
		{for(int i=0;i<v.size();i++) nextToVisit.push(v[i]);}
		void markAndPush()
		{
			marked[pointedNode] = true; nMarked++; push(pointedNode->hookBranches());
		}
	public :
		BFIterator() : pointedNode(0), nextToVisit(queue<Node<T>*>()), marked(map<Node<T>*,bool>), nMarked(0) {}
		BFIterator(Node<T>* N) : BFIterator() {
			if(N!=nullptr){
				pointedNode = N;
				markAndPush();
			}
		}
		BFIterator(vector<Node<T>*>::iterator& i) : BFIterator() {
			pointedNode = *i; markAndPush();
		}
 
		virtual DFIterator operator++(){
			if (!pointedNode==0){
					while(marked[nextToVisit.front()]&&(!nextToVisit.empty())){nextToVisit.pop();}
					if(nextToVisit.empty()){pointedNode=nullptr;}
					else{
						pointedNode=nextToVisit.front(); nextToVisit.pop();
						markAndPush();
					}
			}
			return *this;
		}
		Node<T>* operator *() {return pointedNode;}
		virtual ~BFIterator {}
	};
 
	BFIterator beginBF() {if (!nodes.empty()) return BFIterator(*(nodes.begin())); return BFIterator();}
 
 
};