]> git.lizzy.rs Git - dragonfireclient.git/blob - src/util/cpp11_container.h
Add color names from web page referenced in luaapi doc
[dragonfireclient.git] / src / util / cpp11_container.h
1 /*
2 Minetest
3 Copyright (C) 2016 nerzhul, Loic Blot <loic.blot@unix-experience.fr>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef MT_CPP11CONTAINER_HEADER
21 #define MT_CPP11CONTAINER_HEADER
22
23 #if __cplusplus >= 201103L
24 #define USE_UNORDERED_CONTAINERS
25 #endif
26
27 #if _MSC_VER >= 1600
28 #define USE_UNORDERED_CONTAINERS
29 #endif
30
31 #ifdef USE_UNORDERED_CONTAINERS
32         #include <unordered_map>
33         #include <unordered_set>
34         #define UNORDERED_MAP std::unordered_map
35         #define UNORDERED_SET std::unordered_set
36 #else
37         #include <map>
38         #include <set>
39         #define UNORDERED_MAP std::map
40         #define UNORDERED_SET std::set
41 #endif
42
43 #endif