C++的const类型的引用问题
int ac = 10; int &ay = ac; const int &acy = ac; const int acc = 10; const int &acy1 = acy;//正确 int &acy2 = acc;//编译错误,被引用的类型是const,那么引用类型也必须是const上面的例子也解释了,在set或者map模板参数是自定义类...