diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-17 08:25:30 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-17 08:25:30 +0000 |
commit | 04103c39b5bd000fd70c90f04b86ffc46feb37fd (patch) | |
tree | 718df3e09468a9f5e94e5d9d21c0909ac8cc6537 /gcc/cp/constexpr.c | |
parent | 5edfc334d2f980c688e01b9024f95d5db52a3282 (diff) | |
download | gcc-04103c39b5bd000fd70c90f04b86ffc46feb37fd.tar.gz |
PR c++/65075
* constexpr.c (check_constexpr_bind_expr_vars): Allow
implicit typedefs for lambda types.
* g++.dg/cpp0x/pr65075.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index d415dd4e6d2..32a23ff7380 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -416,7 +416,8 @@ check_constexpr_bind_expr_vars (tree t) for (tree var = BIND_EXPR_VARS (t); var; var = DECL_CHAIN (var)) if (TREE_CODE (var) == TYPE_DECL - && DECL_IMPLICIT_TYPEDEF_P (var)) + && DECL_IMPLICIT_TYPEDEF_P (var) + && !LAMBDA_TYPE_P (TREE_TYPE (var))) return false; return true; } |