Lambdas are often miscalled "functions"; learn how to implement some "function only" features in the article:
Lambda hackery: Overloading, SFINAE and copyrights
by Nikos Athanasiou
From the article:
If we think of lambdas as functions we’d might make an attempt to overload them. This attempt is easy to rebut by stating that lambdas are closures ie runtime objects and well … objects, even callable ones, do not overload! (...) The closest thing to a lambda that can overload is its function call operator, so you might already had your “aha!” moment by now. If not, here it is ...
Add a Comment
Comments are closed.