File tree 4 files changed +4
-4
lines changed 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ namespace sysstr::util
20
20
using size_type = size_t ;
21
21
using hash_type = unsigned ;
22
22
23
- static constexpr size_type max_size = std::numeric_limits<size_t >::max() / sizeof (char16_t );
23
+ static constexpr size_type max_size = std::numeric_limits<ssize_t >::max() / sizeof (char16_t );
24
24
};
25
25
26
26
template <size_t N>
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace sysstr::util
23
23
using size_type = size_t ;
24
24
using hash_type = unsigned ;
25
25
26
- static constexpr size_type max_size = std::numeric_limits<size_t >::max() / sizeof (char );
26
+ static constexpr size_type max_size = std::numeric_limits<ssize_t >::max() / sizeof (char );
27
27
};
28
28
29
29
template <size_t N>
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ namespace sysstr::util
21
21
using size_type = size_t ;
22
22
using hash_type = unsigned ;
23
23
24
- static constexpr size_type max_size = std::numeric_limits<size_t >::max() / sizeof (char16_t );
24
+ static constexpr size_type max_size = std::numeric_limits<ssize_t >::max() / sizeof (char16_t );
25
25
};
26
26
27
27
template <size_t N>
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ namespace sysstr::util::generic
107
107
static constexpr uintptr_t dynamic_flag = 0b01 ;
108
108
using dynamic_type = dynamic_buffer<CharT, SizeT>;
109
109
public:
110
- static constexpr SizeT max_size = SizeT(std::numeric_limits<SizeT>::max() - sizeof (dynamic_type)) / sizeof (CharT);
110
+ static constexpr SizeT max_size = SizeT(std::numeric_limits<std:: make_signed_t < SizeT> >::max() - sizeof (dynamic_type)) / sizeof (CharT);
111
111
public:
112
112
buffer () noexcept
113
113
{
You can’t perform that action at this time.
0 commit comments