Topic: Are these candidates viable? No, they are not even candidates :-)
Author: gennaro_prota@yahoo.com (Gennaro Prota)
Date: Wed, 30 Oct 2002 10:13:08 +0000 (UTC) Raw View
While reading section 13.3.1.2 of the standard I have found the
following funny thing about the built-in candidates for overload
resolution (operators referenced in expressions):
"For all other operators [other than ,, unary & and ->], the built-in
candidates include all of the candidate operator functions defined
in 13.6 that, compared to the given operator,
- have the same operator name, and
- accept the same number of operands, and
- accept operand types to which the given operand or
operands can be converted according to 13.3.3.1, and
- do not have the same parameter type list as any
non-template non-member candidate."
Now, what puzzles me are the second and third bullet: usually those
criteria are used to select the subset of viable functions. In this
case instead, we apply them immediately. That is we start directly
with a restricted set of candidates that excludes what would be non
viable candidates. Why those rules?
Genny.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]