ATLAS Offline Software
Loading...
Searching...
No Matches
flat_set.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
4 */
15
16
17#ifndef CXXUTILS_FLAT_SET_H
18#define CXXUTILS_FLAT_SET_H
19
20#include <version>
21
22#ifdef __cpp_lib_flat_set
23
24// Have std::flat_set. Put it in the CxxUtils namespace.
25#include <flat_set>
26namespace CxxUtils {
27 using std::flat_set;
28}
29
30#else
31
32// We don't have std::flat_set.
33// Use boost::container::flat_set instead.
34#include <functional>
35#include <boost/container/flat_set.hpp>
36namespace CxxUtils {
37 // void for the third argument matches the defaults in
38 // boost/container/container_fwd.hpp
39 template <class KEY, class COMPARE = std::less<KEY>, class KEYCONTAINER = void>
40 using flat_set = boost::container::flat_set<KEY, COMPARE, KEYCONTANER>;
41}
42
43#endif
44
45
46#endif // not CXXUTILS_FLAT_SET_H
boost::container::flat_set< KEY, COMPARE, KEYCONTANER > flat_set
Definition flat_set.h:40