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 » Copy the content of a SortedVectorMap
Copy the content of a SortedVectorMap [message #60732] Wed, 07 August 2024 19:52 Go to previous message
forlano is currently offline  forlano
Messages: 1213
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I have two SortedVectorMap

SortedVectorMap<int, PlayerTB> TBVega, TBS;

where

class PlayerTB : Moveable<PlayerTB> {
public:
	int id;
	int rank;
	Vector<String> tbs;	
	PlayerTB() {}
};


At some moment I would like that the content of TBVega be identical to that of TBS but without loosing/destroying the content of TBS.
Of course I can iterate and copy one by one the elements. I would like to know if there is some efficient way to do it. I read about clone but the compiler complain things that I do not understand. Perhaps I need to do something on class PlayerTB.

 note: copy constructor of 'PlayerTB' is implicitly deleted because field 'tbs' has a deleted copy constructor
        Vector<String> tbs;     
                       ^
C:\upp/uppsrc/Core/Vcont.h:290:2: note: copy constructor is implicitly deleted because 'Vector<Upp::String>' has a user-declared move construct
    or
        Vector(Vector&& v)               { Pick(pick(v)); }
        ^


Thanks,
Luigi

[Updated on: Wed, 07 August 2024 19:53]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: HowTO use Core/SSH with PRIV/PUB Keys ?
Next Topic: How to mark std::array<T, N> moveable if only T is moveable
Goto Forum:
  


Current Time: Thu Aug 07 19:42:35 CEST 2025

Total time taken to generate the page: 0.03895 seconds