#include <iostream> int main() { auto l = []{ return 5; }; decltype(l) new_lambda = [](){ return 7; } ; std::cout << new_lambda() << std::endl; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:7:43: error: conversion from ‘main()::<lambda()>’ to non-scalar type ‘main()::<lambda()>’ requested
decltype(l) new_lambda = [](){ return 7; } ;
^
Standard output is empty