std::set<int, std::less_equal<int>> myset = {1,1,7,8,2,2};
myset.insert(99);
myset.insert(99);
for(const int & val : myset)
std::cout << val << " ";
output:
1 1 2 2 7 8 99 99
Hello, while i was studying on containers. i realized that when i use less_equal
function, standart set container behaves just as a multiset container. Is this normal? if it is, what is the difference between multiset and set?