I noticed a behaviour in some library that I am compiling, which was slightly unexpected and wanted to clarify that.
There is a class which has a method of the following form:
void notify(Frame & frame);
Now, there is a caller which uses a unique_ptr
as follows:
std::unique_ptr <Frame> localFrame (new Frame(rows, cols));
Now when it calls the method it does:
obj->notify(*localFrame);
So this relies on some implicit conversion of the underlying pointer to a reference.
My question is that is this cross platform and expected behaviour? Is there any use for me to do something something like:
obj->notify(*localFrame->get());