F
Fraser Ross
class S {
public:
struct RValue {
RValue() {}
};
struct FValue {
FValue() {}
};
explicit S(RValue) {}
explicit S(FValue) {}
};
void P(S) {
}
int main()
{
S const d((S::RValue()));
P(d);
return 0;
}
It appears to me that the object d is passed a pointer to a function
with no parameters and returns an S::RValue. The Codegear compiler
agrees with me although the Comeau one doesn't. I don't think it will
compile without making a named argument for d unless anyone knows
otherwise?
Fraser.
public:
struct RValue {
RValue() {}
};
struct FValue {
FValue() {}
};
explicit S(RValue) {}
explicit S(FValue) {}
};
void P(S) {
}
int main()
{
S const d((S::RValue()));
P(d);
return 0;
}
It appears to me that the object d is passed a pointer to a function
with no parameters and returns an S::RValue. The Codegear compiler
agrees with me although the Comeau one doesn't. I don't think it will
compile without making a named argument for d unless anyone knows
otherwise?
Fraser.