@@ -28,7 +28,11 @@ class LIBIMP_EXPORT block_collector {
28
28
virtual void recycle (void *p, std::size_t bytes, std::size_t alignment) noexcept = 0;
29
29
};
30
30
31
+ #if defined(LIBIMP_CPP_17)
31
32
using get_block_collector_t = block_collector *(*)() noexcept ;
33
+ #else
34
+ using get_block_collector_t = block_collector *(*)();
35
+ #endif
32
36
33
37
static constexpr std::size_t regular_head_size
34
38
= ::LIBIMP::round_up(sizeof (get_block_collector_t ), alignof (std::max_align_t ));
@@ -123,12 +127,12 @@ class block_pool_resource : public block_resource_base<BlockSize, BlockPoolExpan
123
127
// / \brief Different increment levels match different chunk sizes.
124
128
// / 512 means that 512 consecutive memory blocks are allocated at a time, and the block size is N.
125
129
template <std::size_t L>
126
- constexpr static std::size_t block_pool_expansion = 0 ;
130
+ constexpr std::size_t block_pool_expansion = 0 ;
127
131
128
- template <> constexpr static std::size_t block_pool_expansion<0 > = 512 ;
129
- template <> constexpr static std::size_t block_pool_expansion<1 > = 256 ;
130
- template <> constexpr static std::size_t block_pool_expansion<2 > = 128 ;
131
- template <> constexpr static std::size_t block_pool_expansion<3 > = 64 ;
132
+ template <> constexpr std::size_t block_pool_expansion<0 > = 512 ;
133
+ template <> constexpr std::size_t block_pool_expansion<1 > = 256 ;
134
+ template <> constexpr std::size_t block_pool_expansion<2 > = 128 ;
135
+ template <> constexpr std::size_t block_pool_expansion<3 > = 64 ;
132
136
133
137
// / \brief Match the appropriate memory block resources according to the size of the specification.
134
138
template <std::size_t N, std::size_t L = regular_level(N)>
0 commit comments