If I have a lambda which captures all automatic variables by reference ([&] {}
), why can't it be converted to a function pointer? A regular function can modify variables just like a lambda that captures everything by reference can, so why is it not the same?
I guess in other words, what is the functional difference between a lambda with a &
capture list and a regular function such that the lambda is not convertible to a function pointer?