You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to figure out the meaning of *identity and *+identity used in ExceptionTest.cpp but had no idea. I've never seen sth like this brefore. Why are these operators used on the lambda function identity?
Every capture-free or static lambda has a built-in conversion to pointer-to-function. IIUC, the use of + triggers conversion because the compiler looks for any intermediate built-in conversion that would allow + on the converted-to type. Unary + of a pointer is a no-op. And *+ is just getting a reference-to-function from pointer-to-function the way * normally does.
Hi, I tried to figure out the meaning of
*identity
and*+identity
used in ExceptionTest.cpp but had no idea. I've never seen sth like this brefore. Why are these operators used on the lambda functionidentity
?Many thx for your help.
The text was updated successfully, but these errors were encountered: