Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
声明一个同名的const非成员函数是否被归类为重载?const
const
iterator find ( const key_type& x ); const_iterator find ( const key_type& x ) const;
是的,这是超载。该术语定义[over]/1为:
[over]/1
当在同一范围内为单个名称指定两个或多个不同的声明时,该名称称为重载。
在这里,显然有两个不同的同名声明。