JonasToth added a subscriber: aaron.ballman. JonasToth added a comment. > Different from std::vector::operator[] which has two overloads for const > and non-const access, std::unique_ptr only has one const version of > `operator->`. > > So for SmartPtr x; x->mf(); we only see a const operator being invoked on x. > mf is not a member of SmartPtr and the member call to mf is not on x > directly, we never followed that far.
I think the `operator->` is transitively called, isn't it? (see andrei alexandrescu talk here: https://youtu.be/ozOgzlxIsdg?t=15m55s where he gives a nice class for generic locking) Maybe there is something more general at work? I think @aaron.ballman knows more about deeper language questions :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50883 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits