-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsmall_array.hpp
More file actions
23 lines (19 loc) · 897 Bytes
/
Copy pathsmall_array.hpp
File metadata and controls
23 lines (19 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2018 Jonathan Müller <[email protected]>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#ifndef FOONATHAN_ARRAY_SMALL_ARRAY_HPP_INCLUDED
#define FOONATHAN_ARRAY_SMALL_ARRAY_HPP_INCLUDED
#include <foonathan/array/array.hpp>
#include <foonathan/array/block_storage_default.hpp>
#include <foonathan/array/block_storage_heap_sbo.hpp>
namespace foonathan
{
namespace array
{
/// Convenience alias for [array::array<T>]() with a small size optimization.
template <typename T, std::size_t SmallN, class Heap = default_heap,
class Growth = default_growth>
using small_array = array<T, block_storage_heap_sbo<SmallN * sizeof(T), Heap, Growth>>;
} // namespace array
} // namespace foonathan
#endif // FOONATHAN_ARRAY_SMALL_ARRAY_HPP_INCLUDED