aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.generator/byte_allocator.ccm
blob: 86b2edf6c588856c6ef0e6a28acc6e1dda4e5e33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
///////////////////////////////////////////////////////////////////////////////
// Reference implementation of std::generator proposal P2168.
//
// See https://wg21.link/P2168 for details.
//
///////////////////////////////////////////////////////////////////////////////
// Copyright Lewis Baker, Corentin Jabot
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0.
// (See accompanying file LICENSE or http://www.boost.org/LICENSE_1_0.txt)
///////////////////////////////////////////////////////////////////////////////

export module nihil.generator:byte_allocator;

import nihil.std;

namespace nihil {

template <typename Alloc>
using byte_allocator_t = typename std::allocator_traits<
	std::remove_cvref_t<Alloc>>::template rebind_alloc<std::byte>;

} // namespace nihil