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:
14
gpu/compat/boost/container/small_vector.hpp
Normal file
14
gpu/compat/boost/container/small_vector.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
// boost::container::small_vector for suyu's shader_recompiler: a std::vector with the inline capacity reserved.
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <vector>
|
||||
namespace boost::container {
|
||||
template <typename T, std::size_t N, typename Alloc = void>
|
||||
class small_vector : public std::vector<T> {
|
||||
public:
|
||||
using std::vector<T>::vector;
|
||||
small_vector() { this->reserve(N); }
|
||||
small_vector(std::initializer_list<T> list) : std::vector<T>(list) {}
|
||||
};
|
||||
} // namespace boost::container
|
||||
Reference in New Issue
Block a user