After reading this link: https://en.cppreference.com/w/cpp/container/set, I just found that there were two defined types: key_type and value_type in the class std::set. It seems that they are exactly the same thing.
Well, this may be a stupid question but I still want to ask why. Isn't one enough? Why are there two types?