PUMA Library Reference Manual
|
#include <Puma/CCandidateInfo.h>
Representation of a candidate for the C++ function overload resolution mechanism.
Such a candidate stores the candidate function and the conversion sequences of the function call arguments needed to match the function parameter types of the overloaded function. In special situations it is possible that the overload resolution selects a function that hasn't been parsed, yet, because of delayed parsing of member functions and the initializers of their arguments. Here is an example:
Here the first 'test' is selected, but an error message will have to be issued. This is not considered as a substitution fault, which would have to be ignored ("SFINAE"). The '_delayed' attribute indicates this situation.
Public Member Functions | |
CCandidateInfo (CFunctionInfo *fi) | |
Constructor. | |
~CCandidateInfo () | |
Destructor. | |
CFunctionInfo * | Function () const |
Get the candidate function. | |
void | Function (CFunctionInfo *fi) |
Set the candidate function. | |
void | markDelayedParseProblem () |
Mark the candidate as erroneous due to delayed parsing. | |
bool | hasDelayedParseProblem () const |
Get the delayed parsing problem flag. | |
void | addConvSequence (CCConvSeq *seq) |
Add a conversion sequence for a function argument. | |
unsigned | ConvSequences () const |
Get the number of the conversion sequences. | |
CCConvSeq * | ConvSequence (unsigned n) |
Get the n-th conversion sequence. | |
void | SecondConvSeq (CCConvSeq *seq) |
Set the second conversion sequence. | |
CCConvSeq * | SecondConvSeq () const |
Get the second conversion sequence. | |
|
inline |
Constructor.
fi | The candidate function. |
|
inline |
Destructor.
|
inline |
Add a conversion sequence for a function argument.
The conversion sequences are added in the order of the arguments of the function call.
seq | The conversion sequence. |
|
inline |
Get the n-th conversion sequence.
The n-th conversion sequence corresponds to the n-th function call argument.
n | The conversion sequence or NULL if n is invalid. |
|
inline |
Get the number of the conversion sequences.
|
inline |
Get the candidate function.
|
inline |
Set the candidate function.
fi | The candidate function. |
|
inline |
Get the delayed parsing problem flag.
|
inline |
Mark the candidate as erroneous due to delayed parsing.
|
inline |
Get the second conversion sequence.
|
inline |
Set the second conversion sequence.
This is a user-defined conversion by means of a user-defined conversion function.
seq | The conversion sequence. |