const属性与容器元素排序

给容器里元素排序时,会破坏容器的const的属性;因此当你在一个函数传参的时候如果使用的是const T&;那么你在调用qt的qsort给容器排序的时候可能会遭遇一些看不懂的BUG提示

类似:

error C2678: binary '=' : no operator
found which takes a left-hand operand of type 'const ShapeRectInfo' (or there is no acceptable conversion)

原文地址:https://www.cnblogs.com/likemao/p/10910121.html