Home » U++ Library support » U++ Core » Problem with Vector::Add (pick/clone semantics)
Re: Problem with Vector::Add (pick/clone semantics) [message #52239 is a reply to message #52238] |
Tue, 13 August 2019 17:09 ![Go to previous message Go to previous message](theme/default/images/up.png) ![Go to next message Go to previous message](theme/default/images/down.png) |
![](https://www.ultimatepp.org/forums/images/custom_avatars/3.png) |
mirek
Messages: 13986 Registered: November 2005
|
Ultimate Member |
|
|
Novo wrote on Tue, 13 August 2019 16:02mirek wrote on Tue, 13 August 2019 03:08I 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.
Works now. Thanks.
Quote:
It would be great to have all overloads of
VectorMap& VectorMap&::operator()(const K& k, const T& v)
similar to AMap::Add(k, v).
Done. Long live std::forward...
Mirek
|
|
|
Goto Forum:
Current Time: Tue Jun 18 15:46:52 CEST 2024
Total time taken to generate the page: 0.02589 seconds
|