U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Index<Vector<T>>
Index<Vector<T>> [message #51959] Wed, 26 June 2019 22:01 Go to next message
Novo is currently offline  Novo
Messages: 1432
Registered: December 2006
Ultimate Contributor
Index<Vector<T>> cannot be compiled with the latest source code.
Is this a bug or is it supposed to be this way now?
It was a useful feature ... Rolling Eyes


Regards,
Novo
Re: Index<Vector<T>> [message #51961 is a reply to message #51959] Thu, 27 June 2019 08:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
It should works and works for me (MSVC, MINGW):

CONSOLE_APP_MAIN {
	Index<Vector<int>> x;
	Vector<int> y;
	x.Add(pick(y));
}


Can you post example that does not work for you?

Mirek
Re: Index<Vector<T>> [message #51965 is a reply to message #51961] Thu, 27 June 2019 16:24 Go to previous message
Novo is currently offline  Novo
Messages: 1432
Registered: December 2006
Ultimate Contributor
mirek wrote on Thu, 27 June 2019 02:23

Can you post example that does not work for you?

Mirek

Actually, it turned out, everything works. Semantics of several methods was changed after SVN@13354 (git: 40cd0fd5ec26).
In previous implementation of Index it was possible to write x.Add(y);, and Index was implicitly cloning Vector.
Now you have to do that explicitly.
Some of the old code got broken because of that.
New implementation has correct semantics.
Sorry for the false alarm. Embarassed


Regards,
Novo
Previous Topic: [SOLVED] PHP MD5 equivalent
Next Topic: Problem with FixedVectorMap/FixedArrayMap
Goto Forum:
  


Current Time: Sun Jun 14 22:59:26 GMT+2 2026

Total time taken to generate the page: 0.00775 seconds