early-access version 3663

This commit is contained in:
pineappleEA
2023-06-13 01:03:27 +02:00
parent b2a70f6f9b
commit 429a1a7fb1
86 changed files with 500 additions and 456 deletions

View File

@@ -9,6 +9,7 @@
#include <cstddef>
#include <cstring>
#include <new>
#include <span>
#include <type_traits>
#include <vector>
@@ -53,7 +54,7 @@ public:
return push_count;
}
std::size_t Push(const std::vector<T>& input) {
std::size_t Push(const std::span<T> input) {
return Push(input.data(), input.size());
}

View File

@@ -3,6 +3,9 @@
#pragma once
#include <iterator>
#include "common/concepts.h"
#include "common/make_unique_for_overwrite.h"
namespace Common {
@@ -16,6 +19,12 @@ namespace Common {
template <typename T>
class ScratchBuffer {
public:
using iterator = T*;
using const_iterator = const T*;
using value_type = T;
using element_type = T;
using iterator_category = std::contiguous_iterator_tag;
ScratchBuffer() = default;
explicit ScratchBuffer(size_t initial_capacity)