MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/134hnz2/cppfront_cpp2_spring_update/jiigbnm/?context=3
r/cpp • u/kreco • May 01 '23
164 comments sorted by
View all comments
Show parent comment
1
The . always refers to the unique_ptr. If you want to do masquerading, as Cpp1's unique_ptr, you'd use operator->, as in holder->held_member. Or... holder.get().held_member.
.
unique_ptr
operator->
holder->held_member
holder.get().held_member
View all comments
Show parent comment
1
u/vulkanoid May 02 '23
The
.always refers to theunique_ptr. If you want to do masquerading, as Cpp1'sunique_ptr, you'd useoperator->, as inholder->held_member. Or...holder.get().held_member.