1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

* If std::tr1::unordered_set is unavailable, use std::set.

This commit is contained in:
Eelco Dolstra 2010-10-04 16:16:19 +00:00
parent 36a23e86b6
commit 95f4f2cf61
2 changed files with 16 additions and 0 deletions

View file

@ -1,8 +1,13 @@
#ifndef __SYMBOL_TABLE_H
#define __SYMBOL_TABLE_H
#include "config.h"
#include <map>
#if HAVE_TR1_UNORDERED_SET
#include <tr1/unordered_set>
#endif
#include "types.hh"
@ -60,7 +65,11 @@ inline std::ostream & operator << (std::ostream & str, const Symbol & sym)
class SymbolTable
{
private:
#if HAVE_TR1_UNORDERED_SET
typedef std::tr1::unordered_set<string> Symbols;
#else
typedef std::set<string> Symbols;
#endif
Symbols symbols;
public: