Does the version of `const` and non-`const` of a member function qualify as overload?

Declares a member function const and not const with the same name as overload?

 iterator find ( const key_type& x ); const_iterator find ( const key_type& x ) const; 
+4
source share
1 answer

Yes, this is an overload. The term is defined in [over]/1 as:

If two or more different declarations are specified for the same name in the same area, that name is considered overloaded.

There are two different ads with the same name.

+2
source

Source: https://habr.com/ru/post/1446371/


All Articles