MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / Less

Class Less

include/sonic/dom/dynamicnode.h:338–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336 using MAType = MapAllocator<std::pair<const MSType, size_t>, Allocator>;
337#if defined(SONIC_STATIC_DISPATCH)
338 struct Less {
339 bool operator()(MSType s1, MSType s2) const {
340 size_t n1 = s1.size(), n2 = s2.size();
341 const size_t len = std::min(n1, n2);
342 int cmp = internal::InlinedMemcmp(s1.data(), s2.data(), len);
343 return cmp < 0 || (cmp == 0 && n1 < n2);
344 }
345 };
346 using map_type = std::multimap<MSType, size_t, Less, MAType>;
347#else
348 using map_type = std::multimap<MSType, size_t, std::less<MSType>, MAType>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected