OverloadingResult UserDefResult
= IsUserDefinedConversion(From, ToType, ICS.UserDefined, Conversions,
!SuppressUserConversions, AllowExplicit,
- ForceRValue, UserCast);
+ UserCast);
if (UserDefResult == OR_Success) {
ICS.setUserDefined();
/// "explicit" conversion functions as well as non-explicit conversion
/// functions (C++0x [class.conv.fct]p2).
///
-/// \param ForceRValue true if the expression should be treated as an rvalue
-/// for overload resolution.
/// \param UserCast true if looking for user defined conversion for a static
/// cast.
OverloadingResult Sema::IsUserDefinedConversion(Expr *From, QualType ToType,
OverloadCandidateSet& CandidateSet,
bool AllowConversionFunctions,
bool AllowExplicit,
- bool ForceRValue,
bool UserCast) {
if (const RecordType *ToRecordType = ToType->getAs<RecordType>()) {
if (RequireCompleteType(From->getLocStart(), ToType, PDiag())) {
AddTemplateOverloadCandidate(ConstructorTmpl, FoundDecl,
/*ExplicitArgs*/ 0,
&From, 1, CandidateSet,
- SuppressUserConversions, ForceRValue);
+ SuppressUserConversions, false);
else
// Allow one user-defined conversion when user specifies a
// From->ToType conversion via an static cast (c-style, etc).
AddOverloadCandidate(Constructor, FoundDecl,
&From, 1, CandidateSet,
- SuppressUserConversions, ForceRValue);
+ SuppressUserConversions, false);
}
}
}
OverloadCandidateSet CandidateSet(From->getExprLoc());
OverloadingResult OvResult =
IsUserDefinedConversion(From, ToType, ICS.UserDefined,
- CandidateSet, true, false, false, false);
+ CandidateSet, true, false, false);
if (OvResult == OR_Ambiguous)
Diag(From->getSourceRange().getBegin(),
diag::err_typecheck_ambiguous_condition)