Skip to content

Commit

Permalink
Fix naked 'max' call that was failing on Windows. Fixes #864
Browse files Browse the repository at this point in the history
  • Loading branch information
mclow committed Feb 27, 2024
1 parent 8ec1be1 commit ec7da07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/pool/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
size_type max_chunks() const
{ //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
return ((std::numeric_limits<size_type>::max)() - POD_size) / alloc_size();
}

static void * & nextof(void * const ptr)
Expand Down

0 comments on commit ec7da07

Please sign in to comment.