Код: Выделить всё
#include
#include
#include
#include
#include
struct Values
{
uint32_t a = 0;
uint32_t b = 0;
Values(uint32_t x, uint32_t y): a(x), b(y) {}
};
template
auto print_top_k(std::size_t k, MapType&& map)
{
std::vector v;
v.reserve(map.size());
std::cout rhs.second.b; });
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79382902/why-isnt-stdpartial-sort-copy-populating-the-vector[/url]
Мобильная версия