Skip to content

Commit 1785db4

Browse files
committed
use std::byte
1 parent d6ccae4 commit 1785db4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/beman/inplace_vector/inplace_vector.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <algorithm>
44
#include <array>
55
#include <cassert>
6+
#include <cstddef>
67
#include <exception>
78
#include <iterator>
89
#include <limits>
@@ -75,7 +76,7 @@ struct inplace_vector_array_based_storage {
7576
// Selecting this storage type implies: !std::is_trivial_v<T> and Capacity != 0
7677
template <typename T, std::size_t Capacity>
7778
struct inplace_vector_bytes_based_storage {
78-
alignas(T) unsigned char elems[Capacity * sizeof(T)];
79+
alignas(T) std::byte elems[Capacity * sizeof(T)];
7980

8081
T *begin() { return std::launder(reinterpret_cast<const T *>(elems)); }
8182
const T *begin() const {

0 commit comments

Comments
 (0)