mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	pool: add emplace() function
This commit is contained in:
		
							parent
							
								
									746c29b171
								
							
						
					
					
						commit
						a7c66fdc61
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -871,6 +871,12 @@ public:
 | 
			
		|||
		return std::pair<iterator, bool>(iterator(this, i), true);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	template<typename... Args>
 | 
			
		||||
	std::pair<iterator, bool> emplace(Args&&... args)
 | 
			
		||||
	{
 | 
			
		||||
		return insert(K(std::forward<Args>(args)...));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	int erase(const K &key)
 | 
			
		||||
	{
 | 
			
		||||
		int hash = do_hash(key);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue