Skip to content

Commit

Permalink
fix(vector): sizeof(std::vector<T>) is hard coded
Browse files Browse the repository at this point in the history
  • Loading branch information
tearfur authored Oct 17, 2023
1 parent 589f1d1 commit d066984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/small/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1809,15 +1809,15 @@ namespace small {
template <
class T,
size_t N
= (std::max)((sizeof(std::vector<T>) * 2) / sizeof(T), std::size_t(5)),
= (std::max)((24 * 2) / sizeof(T), std::size_t(5)),
class Allocator = std::allocator<T>,
class SizeType = size_t>
using max_size_vector = vector<T, N, Allocator, std::false_type, SizeType>;

template <
class T,
size_t N
= (std::max)((sizeof(std::vector<T>) * 2) / sizeof(T), std::size_t(5)),
= (std::max)((24 * 2) / sizeof(T), std::size_t(5)),
class Allocator = std::allocator<T>,
class SizeType = size_t>
using inline_vector = vector<T, N, Allocator, std::true_type, SizeType>;
Expand Down

0 comments on commit d066984

Please sign in to comment.