Skip to content

Commit 3ba3bb5

Browse files
committed
callback - Fixed type-deduction when inheritance is involved
The type deduction for the callback constructors was to strict and prevented implicit casts for the context pointer stored internally. As noted by @pan-, relaxing the contraints on the templated parameters allows C++ to correctly infer implicit casts such as conversions between child and parent classes when inheritance is involved. As an additional benefit, this may help the user experience by defering invalid type errors to when the types are expanded, limiting the number of error messages presented to users.
1 parent 79abaab commit 3ba3bb5

File tree

1 file changed

+168
-168
lines changed

1 file changed

+168
-168
lines changed

0 commit comments

Comments
 (0)