Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » vectormap exampe is not working anymore
Re: vectormap exampe is not working anymore [message #58397 is a reply to message #58396] Mon, 16 May 2022 16:28 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
As it should. Vector does not have copy constructor. It was always this way.

cache.FindAdd(line) would do what you need here.

If you really need non-empty init value, use

cache.FindAdd(line, pick(v))

Also consider using GetAdd, e.g.

Vector<Value>& x = cache.GetAdd(line);

is the variant I use most often.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: SSL and USEMALLOC
Next Topic: Windows 11 - Menubar issues
Goto Forum:
  


Current Time: Thu Aug 21 11:37:35 CEST 2025

Total time taken to generate the page: 0.12447 seconds