diff --git a/uppsrc/Core/InVector.h b/uppsrc/Core/InVector.h index 270d1ff22..064384a92 100644 --- a/uppsrc/Core/InVector.h +++ b/uppsrc/Core/InVector.h @@ -646,7 +646,8 @@ class SortedVectorMap : public SortedAMap >, public: T& Add(const K& k) { B::key.Add(k); return *B::value.res; } - T& Add(const K& k, const T& x) { B::key.Add(k); *B::value.res = x; return *B::value.res; } + T& Add(const K& k, const T& x) { B::key.Add(k); *B::value.res = clone(x); return *B::value.res; } + T& Add(const K& k, T&& x) { B::key.Add(k); *B::value.res = pick(x); return *B::value.res; } int FindAdd(const K& k) { return B::key.FindAdd(k); } int FindAdd(const K& k, const T& init); @@ -724,6 +725,7 @@ class SortedArrayMap : public MoveableAndDeepCopyOption diff --git a/uppsrc/Core/src.tpp/SortedArrayMap_en-us.tpp b/uppsrc/Core/src.tpp/SortedArrayMap_en-us.tpp index 5a3b8bb8a..3201970d5 100644 --- a/uppsrc/Core/src.tpp/SortedArrayMap_en-us.tpp +++ b/uppsrc/Core/src.tpp/SortedArrayMap_en-us.tpp @@ -1,5 +1,4 @@ topic "SortedArrayMap"; -[2 $$0,0#00000000000000000000000000000000:Default] [i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class] [l288;2 $$2,2#27521748481378242620020725143825:desc] [0 $$3,0#96390100711032703541132217272105:end] @@ -9,6 +8,7 @@ topic "SortedArrayMap"; [l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param] [i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam] [b42;2 $$9,9#13035079074754324216151401829390:normal] +[2 $$0,0#00000000000000000000000000000000:Default] [{_}%EN-US [ {{10000@(113.42.0) [s0; [*@7;4 SortedArrayMap]]}}&] [s0;i448;a25;kKO9;@(0.0.255)%- &] @@ -30,6 +30,8 @@ be derived from [%-*@4 T].&] [s3;%- &] [s5;:SortedArrayMap`:`:Add`(const K`&`,const T`&`):%- [*@4 T][@(0.0.255) `&]_[* Add]([@(0.0.255) c onst]_[*@4 K][@(0.0.255) `&]_[*@3 k], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x])&] +[s5;:Upp`:`:SortedArrayMap`:`:Add`(const K`&`,T`&`&`):%- [*@4 T][@(0.0.255) `&]_[* Add]([@(0.0.255) c +onst]_[*@4 K][@(0.0.255) `&]_[*@3 k], [*@4 T][@(0.0.255) `&`&]_[*@3 x])&] [s2; Inserts a copy of key`-value pair at upper bound key position and returns reference to element value.&] [s3; &] diff --git a/uppsrc/Core/src.tpp/SortedVectorMap_en-us.tpp b/uppsrc/Core/src.tpp/SortedVectorMap_en-us.tpp index 46c0c714d..dc98745b3 100644 --- a/uppsrc/Core/src.tpp/SortedVectorMap_en-us.tpp +++ b/uppsrc/Core/src.tpp/SortedVectorMap_en-us.tpp @@ -1,5 +1,4 @@ topic "SortedVectorMap"; -[2 $$0,0#00000000000000000000000000000000:Default] [i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class] [l288;2 $$2,2#27521748481378242620020725143825:desc] [0 $$3,0#96390100711032703541132217272105:end] @@ -9,6 +8,7 @@ topic "SortedVectorMap"; [l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param] [i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam] [b42;2 $$9,9#13035079074754324216151401829390:normal] +[2 $$0,0#00000000000000000000000000000000:Default] [{_}%EN-US [ {{10000@(113.42.0) [s0; [*@7;4 SortedVectorMap]]}}&] [s1;@(0.0.255)3%- &] @@ -28,6 +28,8 @@ keys and values have to be [^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ Moveable [s3;%- &] [s5;:SortedVectorMap`:`:Add`(const K`&`,const T`&`):%- [*@4 T][@(0.0.255) `&]_[* Add]([@(0.0.255) c onst]_[*@4 K][@(0.0.255) `&]_[*@3 k], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x])&] +[s5;:Upp`:`:SortedVectorMap`:`:Add`(const K`&`,T`&`&`):%- [*@4 T][@(0.0.255) `&]_[* Add]([@(0.0.255) c +onst]_[*@4 K][@(0.0.255) `&]_[*@3 k], [*@4 T][@(0.0.255) `&`&]_[*@3 x])&] [s2; Inserts a copy of key`-value pair at upper bound key position and returns reference to element value.&] [s3; &]