#include using namespace Upp; namespace Upp { //template <> //inline constexpr bool is_upp_guest = true; }; template <> inline constexpr bool Upp::is_upp_guest = true; template<> inline hash_t Upp::GetHashValue(const std::string& a) { return memhash(a.data(), a.length()); } CONSOLE_APP_MAIN { { Vector h; for(int i = 0; i < 20; i++) h << AsString(i); RDUMP(h); Vector rem = { 1, 2, 3 }; h.Remove(rem); RDUMP(h); h.RemoveIf([&](int i) { return h[i].EndsWith("8"); }); RDUMP(h); Vector n = { "21", "22", "23" }; h.Insert(2, pick(n)); RDUMP(h); h.Remove(2, 3); RDUMP(h); } RLOG("======================="); { Vector h; for(int i = 0; i < 20; i++) h << AsString(i).ToStd(); RDUMP(h); Vector rem = { 1, 2, 3 }; h.Remove(rem); RDUMP(h); h.RemoveIf([&](int i) { return h[i].back() == '8'; }); RDUMP(h); Vector n = { "21", "22", "23" }; h.Insert(2, n); RDUMP(h); h.Insert(2, pick(n)); RDUMP(h); h.Remove(2, 3); RDUMP(h); } { Index x { "one", "two", "three" }; RDUMP(x); RDUMP(x.Find("two")); } CheckLogEtalon(); }