yuzu/externals/cpp-jwt/include/jwt/test/test_stack_alloc.cc

23 lines
394 B
C++
Raw Normal View History

2022-07-26 05:25:01 +04:00
#include <iostream>
#include <vector>
#include "jwt/stack_alloc.hpp"
template <typename T, size_t SZ = 2>
using SmallVector = std::vector<T, jwt::stack_alloc<T, SZ, alignof(T)>>;
int main()
{
SmallVector<int>::allocator_type::arena_type a;
SmallVector<int> v{a};
v.push_back(1);
v.push_back(1);
v.push_back(1);
v.push_back(1);
v.push_back(1);
v.push_back(1);
return 0;
}