This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67350] New: auto deduction error in variable template lambda
- From: "norbert.pfeiler+gcc.gnu.org/bugzilla at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Aug 2015 09:23:11 +0000
- Subject: [Bug c++/67350] New: auto deduction error in variable template lambda
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67350
Bug ID: 67350
Summary: auto deduction error in variable template lambda
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: norbert.pfeiler+gcc.gnu.org/bugzilla at gmail dot com
Target Milestone: ---
template<typename T>
auto test = [](){
return T{};
};
int main() {
test<int>();
}
error: use of 'test<int>' before deduction of 'auto'
Clang 3.6.2 acceptsâ
Iâm not exactly sure this code is valid, but i canât find much about variable
templates and lambdas.