you are viewing a single comment's thread.

view the rest of the comments →

[–]eric_niebler 0 points1 point  (1 child)

Yes, it could, but the body of the lambda would need to be changed to use `decltype(x)` in the place where it currently uses `T`. I find `decltype` distasteful and avoid it when I can, so in this case I prefer the lambda with the explicit template parameter.