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++ Core » Problem with Vector::Add (pick/clone semantics)
Re: Problem with Vector::Add (pick/clone semantics) [message #52238 is a reply to message #52235] Tue, 13 August 2019 16:02 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Tue, 13 August 2019 03:08
I made it work, even without pick:

This won't compile:

	const VectorMap<Vector<String>, String> MY_MAP = {
	    {Vector<String>{"s11", "s12", "s13", "s14"}, "s1"},
	};

pick wasn't needed because Vector<String>{...} is an rvalue by itself.

It would be great to have all overloads of
	VectorMap& VectorMap&::operator()(const K& k, const T& v)

similar to AMap::Add(k, v).

IMHO, the problem is not a constructor of VectorMap, but an implementation of std::initializer_list. I believe I saw an alternative implementation somewhere.


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Vector< Vector<int> > compilation error
Next Topic: SHA1 Doesn't work any more for data over 65536 bytes
Goto Forum:
  


Current Time: Thu May 02 20:44:15 CEST 2024

Total time taken to generate the page: 0.02615 seconds