forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c++: zero_init_expr_p of dependent expression [PR95678]
gcc/cp/ChangeLog: PR c++/95678 * tree.c (zero_init_expr_p): Use uses_template_parms instead of dependent_type_p. gcc/testsuite/ChangeLog: PR c++/95678 * g++.dg/cpp0x/dependent3.C: New test. (cherry picked from commit 9a453da)
- Loading branch information
Patrick Palka
committed
Jun 16, 2020
1 parent
93c2834
commit d986703
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// { dg-do compile { target c++11 } } | ||
|
||
template<typename c> | ||
struct d | ||
{ | ||
using e = c; | ||
}; | ||
|
||
template<class f> | ||
struct g | ||
{ | ||
using h = typename d<f>::e; | ||
|
||
template<class i, class j> | ||
auto operator()(i, j k) -> decltype(h{k}); | ||
}; | ||
|
||
template<class l> | ||
void m() | ||
{ | ||
int a[1]; | ||
l{}(a, a); | ||
} | ||
|
||
int main() | ||
{ | ||
m<g<int *>>(); | ||
} |