mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
Triforce v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
21
gpu/compat/boost/container/static_vector.hpp
Normal file
21
gpu/compat/boost/container/static_vector.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// boost::container::static_vector for suyu's code: a std::vector (capacity and options are not enforced).
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
namespace boost::container {
|
||||
template <std::size_t A>
|
||||
struct inplace_alignment {};
|
||||
template <bool B>
|
||||
struct throw_on_overflow {};
|
||||
template <typename... Options>
|
||||
struct static_vector_options {
|
||||
using type = static_vector_options;
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N, typename Options = void>
|
||||
class static_vector : public std::vector<T> {
|
||||
public:
|
||||
using std::vector<T>::vector;
|
||||
static_vector() { this->reserve(N); }
|
||||
};
|
||||
} // namespace boost::container
|
||||
Reference in New Issue
Block a user