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 » BiVector::PopHead/PopTail possible bug
BiVector::PopHead/PopTail possible bug [message #61711] Wed, 25 June 2025 14:22
luoganda is currently offline  luoganda
Messages: 215
Registered: November 2016
Experienced Member
T        PopTail()               { T x = Tail(); DropTail(); return x; }


msvc cl produces ...\uppsrc\Core\BiCont.h (47): error C2280: ... attempting to reference a deleted function.
because it returns deleted object. Since it's not using pick.

Item uses Moveable, eg struct Item:Moveable<Item>{...}
BiVector<Item> queue;
Transfer semantics ctor/=oper was also made.
...
Item item=queue.PopTail(); produced that.
What exactly produces that is having Vector<char> temp; in the Item,
but having std::vector<char> temp; works ok.
Having only basic types(int,char,...) does not produce it.

There is no examples, nor in the src/... nor in other examples what concerns this,
except int q = data.PopTail(); <= but this uses int not struct/class.

By the way,
how to convert a regular c-like-array into Vector?
byte *array; //<=array has eg 100 elements
Vector<byte> varr;
Would be this the best way?
varr.AppendRange(SubRange(array,100));?

Also,
what is usually used for std::queue?
One of BiVector or BiArray? or something else?

[Updated on: Wed, 25 June 2025 15:52]

Report message to a moderator

Previous Topic: Big issue with Visual Studio 2019 (some versions)
Next Topic: Add compilable testcases for nontrivial problems!
Goto Forum:
  


Current Time: Tue Jul 01 09:25:45 CEST 2025

Total time taken to generate the page: 0.02486 seconds