A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
network
utils
sgi-hashmap.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
19
*/
20
21
/* This code snippet was ripped out of the gcc
22
* documentation and slightly modified to work
23
* with gcc 4.x
24
*/
25
#ifndef SGI_HASHMAP_H
26
#define SGI_HASHMAP_H
27
28
/* To use gcc extensions.
29
*/
30
#ifdef __GNUC__
31
#if __GNUC__ < 3 // GCC 2.x
32
#include <hash_map.h>
33
namespace
sgi
{ using ::hash_map; };
// inherit globals
34
#else
35
#if __GNUC__ < 4 // GCC 3.x
36
#include <ext/hash_map>
37
#if __GNUC_MINOR__ == 0
38
namespace
sgi
=
std
;
// GCC 3.0
39
#else
40
namespace
sgi
= ::__gnu_cxx;
// GCC 3.1 and later
41
#endif
42
#else
43
#if __GNUC__ < 5 // GCC 4.x
44
#if __GNUC_MINOR__ < 3 // GCC 4.0, 4.1 and 4.2
45
#ifdef __clang__ // Clang identifies as GCC 4.2
46
#undef __DEPRECATED
47
#endif
48
#include <ext/hash_map>
49
namespace
sgi
= ::__gnu_cxx;
50
#else
51
#undef __DEPRECATED
52
#include <backward/hash_map>
53
namespace
sgi
= ::__gnu_cxx;
54
#endif
55
#else // GCC 5.x
56
#undef __DEPRECATED
57
#include <backward/hash_map>
58
namespace
sgi
= ::__gnu_cxx;
59
#endif
60
#endif
61
#endif
62
#else // ... there are other compilers, right?
63
namespace
sgi
=
std
;
64
#endif
65
66
67
#endif
/* SGI_HASHMAP_H */
std
STL namespace.
Generated on Wed Nov 7 2018 10:02:08 for ns-3 by
1.8.14