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.