ATLAS Offline Software
Loading...
Searching...
No Matches
inplace_vector.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 */
17
18
19#ifndef CXXUTILS_INPLACE_VECTOR_H
20#define CXXUTILS_INPLACE_VECTOR_H
21
22#include <version>
23
24#ifdef __cpp_lib_inplace_vector
25
26// Have std::inplace_vector. Put it in the CxxUtils namespace.
27#include <inplace_vector>
28namespace CxxUtils {
29 using std::inplace_vector;
30}
31
32#else
33
34// We don't have std::inplace_vector.
35// Use boost::container::small_vector instead.
36#include <boost/container/small_vector.hpp>
37namespace CxxUtils {
38 template <class T, size_t N>
39 using inplace_vector = boost::container::small_vector<T, N>;
40}
41
42#endif
43
44
45#endif // not CXXUTILS_INPLACE_VECTOR_H
boost::container::small_vector< T, N > inplace_vector