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 » Vector< Vector<int> > compilation error
Vector< Vector<int> > compilation error [message #52231] Mon, 12 August 2019 21:50 Go to next message
forlano is currently offline  forlano
Messages: 1062
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I have upgraded to MSVC 2019 and latest nightly build.
This piece of code no longer compile

...
  Vector< Vector<int> > playerHistory;
  for (i=0; i<=TD.NPlayer; i++) {
  	Vector<int> v;
  	playerHistory.Add(v);   
  }
...


the compiler complain about a temptive to make reference to a function that has been eliminated.
Is there an equivalent way to write it and continue to use that code?

Thanks,
Luigi
Re: Vector< Vector<int> > compilation error [message #52233 is a reply to message #52231] Mon, 12 August 2019 21:51 Go to previous message
mirek is currently offline  mirek
Messages: 11991
Registered: November 2005
Ultimate Member
.Add(clone(v));

or

.Add(pick(v)); // this is faster but does v.Clear

Mirek
Previous Topic: Implementation of Vector::Add()
Next Topic: Problem with Vector::Add (pick/clone semantics)
Goto Forum:
  


Current Time: Tue Aug 20 01:38:03 CEST 2019

Total time taken to generate the page: 0.00637 seconds