ipfs-chromium
Loading...
Searching...
No Matches
flat_mapset.h
1#ifndef CHROMIUM_IPFS_VOCAB_MAP_SET_H_
2#define CHROMIUM_IPFS_VOCAB_MAP_SET_H_
3
4#if __has_include("base/containers/flat_map.h") // Chromium
5
6#include "base/containers/flat_map.h"
7#include "base/containers/flat_set.h"
8#include "base/debug/debugging_buildflags.h"
9namespace ipfs {
10using base::flat_map;
11using base::flat_set;
12} // namespace ipfs
13
14#elif __has_cpp_attribute(__cpp_lib_flat_map) && \
15 __has_cpp_attribute(__cpp_lib_flat_set)
16
17#include <flat_map>
18#include <flat_set>
19namespace ipfs {
20using std::flat_map;
21using std::flat_set;
22} // namespace ipfs
23
24#elif __has_include(<boost/container/flat_map.hpp>) //Boost
25#include <boost/container/flat_map.hpp>
26#include <boost/container/flat_set.hpp>
27namespace ipfs {
28using boost::container::flat_map;
29using boost::container::flat_set;
30} // namespace ipfs
31
32#else
33
34#error \
35 "Provide an implementation for flat_map and flat_set, or install boost or have a Chromium tree or use a newer C++ version."
36
37#endif
38
39#endif // CHROMIUM_IPFS_VOCAB_MAP_SET_H_