Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

Overload resolution with lambdas has to try each possible conversion from each lambda to each target type. This then involves binding the bodies of the lambdas, which may involves doing the same in the interior, etc etc. This can trivially lead to a combinatorial explosion which can add up to seconds or minutes of compilation time.

By supplying the argument and return types, the compiler does not have to do this work, massively speeding things up in some pathological cases.

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@huoyaoyuan
Comment options

@ufcpp
Comment options

@mu88
Comment options

@CyrusNajmabadi
Comment options

Answer selected by mu88
@rawling
Comment options

@CyrusNajmabadi
Comment options

@CyrusNajmabadi
Comment options

@rawling
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants