Let `f()` be a function that returns a `unique_ptr<X>` and let `m` be a member field of `X`. While `f()` can be used as an rvalue reference, `f()->m` cannot, forcing me to use `move(f()->m)`. 

Assuming that I can define my own `unique_ptr` instead of using the existing one, is there a way to make my `->` operator keep the rvalue-ness? If this is not recommended, please explain why.

EDIT: To all people telling me to add a getter. I am trying to avoid adding special support in X, I want to do it through the unique\_ptr only. Also, your solution can be improved by using a right reference for this as in the following example:

```
struct X {
    SomeType m;
    const SomeType &getM() const { return m; }
    SomeType &&getM() && { return move(m); }
    SomeType &getM() { return m; } 
}

```