microsoft / GSL

Guidelines Support Library
Other
6.13k stars 737 forks source link

Properly handle finally(actual_function) #1056

Closed CaseyCarter closed 1 year ago

CaseyCarter commented 1 year ago

finally needs to use decay_t instead of remove_cvref_t so it can properly accept non-object function arguments by decaying to function pointer type. Adds test coverage for this use case which was previously missing.

dmitrykobets-msft commented 1 year ago

Thanks for the catch!