You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					27 lines
				
				745 B
			
		
		
			
		
	
	
					27 lines
				
				745 B
			| 
								 
											6 months ago
										 
									 | 
							
								#pragma once
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <memory>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace detail::refcount_hive
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								// To enable conversion to void * when allocator supplies non-raw pointers:
							 | 
						||
| 
								 | 
							
								template <class source_pointer_type>
							 | 
						||
| 
								 | 
							
								static constexpr void *void_cast(const source_pointer_type source_pointer) noexcept
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    return static_cast<void *>(&*source_pointer);
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								template <class iterator_type>
							 | 
						||
| 
								 | 
							
								static constexpr std::move_iterator<iterator_type> make_move_iterator(iterator_type it)
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    return std::move_iterator<iterator_type>(std::move(it));
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								enum class priority { performance = 1, memory_use = 4 };
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								struct limits {
							 | 
						||
| 
								 | 
							
								    size_t min, max;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    constexpr limits(const size_t minimum, const size_t maximum) noexcept : min(minimum), max(maximum) {}
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								} // namespace detail::refcount_hive
							 |