microsoft / wil

Windows Implementation Library
MIT License
2.57k stars 234 forks source link

added -> operator to unique_wdf_object_reference #447

Closed bevancollins closed 3 months ago

rahul-ramadas commented 3 months ago

I'm not quite sure I see the utility of adding this. Overloading -> makes sense when what is returned is itself a pointer, so that you can apply indirection on it to access its fields/methods. But in this case, what is returned is a WDF object type like WDFREQUEST, which doesn't have any fields/methods. Can you please exemplify the use-case with some sample code?

Note that this is also the reason why unique_any also does not have an overloaded ->. unique_any is meant for "handle" types, not pointer types.

bevancollins commented 3 months ago

oops, sorry I screwed up.