mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 09:18:33 +00:00
Base64 encoder decoder + Stack allocator
This commit is contained in:
parent
42e205a835
commit
b55cbe49c4
6 changed files with 444 additions and 0 deletions
22
include/jwt/test_stack_alloc.cc
Normal file
22
include/jwt/test_stack_alloc.cc
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include "./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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue