TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:

Coming back to how C++ handles static overloading. How is
the sort order of (int *), (int &), (int), (const int *),
(const int &), (const int), (int * const) and (const int * const)?
I'm too lazy to look up the details, sorry.


Without looking anything up in the standard,
int and int& are indistinguishable.
int* is a different type from int, and won't be confused.
const vs const int don't matter to the caller.

- const int& is preferred over int/int&.
- const int* is preferred over int*.

--John


Reply via email to