mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
Bug 485985 - Function call expression with dependent function argument
Change-Id: I56358d53020a2b586a41fac66f40170901c872f5
This commit is contained in:
parent
3d44e89bee
commit
bf2ea12951
2 changed files with 29 additions and 1 deletions
|
@ -8709,6 +8709,32 @@ public class AST2TemplateTests extends AST2TestBase {
|
|||
BindingAssertionHelper helper = getAssertionHelper();
|
||||
helper.assertNonProblem("waldo<T>", ICPPDeferredFunction.class);
|
||||
}
|
||||
|
||||
// template<bool, typename T = void>
|
||||
// struct enable_if {};
|
||||
//
|
||||
// template<typename T>
|
||||
// struct enable_if<true, T> {
|
||||
// typedef T type;
|
||||
// };
|
||||
//
|
||||
// template <typename T>
|
||||
// constexpr bool F() {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// template <typename T>
|
||||
// typename enable_if<!F<T>(), void>::type waldo(T p); // problem on the return type
|
||||
//
|
||||
// struct A {};
|
||||
//
|
||||
// void test() {
|
||||
// A a;
|
||||
// waldo(a); // problem on waldo
|
||||
// }
|
||||
public void testDependentFunctionSet_485985() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// template <typename>
|
||||
// struct C {
|
||||
|
|
|
@ -132,7 +132,9 @@ public class EvalFunctionSet extends CPPDependentEvaluation {
|
|||
|
||||
@Override
|
||||
public boolean isValueDependent() {
|
||||
return false;
|
||||
// The value of the function set (which function it resolves to) is
|
||||
// dependent under the same circumstances when its type is dependent.
|
||||
return isTypeDependent();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue