Imagine some function (`RetrieveResult`), returning an object by pointer/reference/value - I don't know and don't want to know, because things may change. I just want to store the result, using `auto` and also protect that object from accidental changing in the current scope or, for example, if the object is propagated upwards.

It is quite intuitive just to write:

```
const auto result = RetrieveResult();

```

and everything works fine, if `RetrieveResult` returns an object by value or by reference. But if the function returns a pointer, constancy is applied to that pointer, not to the object the poiter points to. What way I still can change the object. Writing

```
const auto const result = ....

```

results in the compilation error:

> 
> duplicate 'const'
> 
> 
> 

Of course, I can declare variable like this:
 const auto\* ...
 const auto\* const...

But that way ties me close to pointers, i.e. it isn't a universal solution.

Is it possible to preserve true constancy, and, in the same time, provide flexibility (independency of the concrete type)?