-
Is there a plan to add type deduction for such types, at least for those with readonly modifiers? Example: Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I realized this can be simplified with target-typed new, although it might not cover all situations. |
Beta Was this translation helpful? Give feedback.
-
I didn't know about target-typed new. This is brilliant! Solving the problem from the other direction and its actually better! You get the explicitness of the type on the left while eliminating the redundancy. Thank you! https://www.thomasclaudiushuber.com/2020/09/08/c-9-0-target-typed-new-expressions/ |
Beta Was this translation helpful? Give feedback.
I realized this can be simplified with target-typed new, although it might not cover all situations.