In this case, I would get compilation error as resource::get is not const and my lambda is not mutable. Changing the lambda to mutable leads to #473 . Am I misusing observable::scope? I could not find many information about its correct usage...
Still, to make my code work, I could make mutable the callback in observer as proposed in #473, but I'm wondering if it does makes sense in this case. Is there a compelling reason not to make resource::get() const? By looking at the source I can see that it is just calling get on a _sharedptr (which is const already...).
I have problems understanding how to use a resource to create a new observable from scratch. The most trivial example I can come out with is:
In this case, I would get compilation error as resource::get is not const and my lambda is not mutable. Changing the lambda to mutable leads to #473 . Am I misusing observable::scope? I could not find many information about its correct usage...
Still, to make my code work, I could make mutable the callback in observer as proposed in #473, but I'm wondering if it does makes sense in this case. Is there a compelling reason not to make resource::get() const? By looking at the source I can see that it is just calling get on a _sharedptr (which is const already...).