Re: [sigc] C++11 'auto' with sigc::mem_fun doesn't track object lifetime (potential crash)



Den 2016-03-02 kl. 14:22, skrev Andrejs Hanins:
Hi Paul,

On 03/02/2016 03:10 PM, Paul Davis wrote:
if you want the behaviour of sigc::trackable, then you MUST use sigc::slot.  there's no "shoot in the foot" issue here.
That makes sense, but isn't documentation still confusing, as it mentions 'slot' when speaking about mem_fun. Slot is indeed present in the example code below mem_fun description, but it is not obvious which 'slot' the sentence is talking about. I'm not insisting on this, just a space for a potential improvement. Maybe change the docs to "Note that _in the example below_ only if the object..."

The documentation became confusing when we started using C++11, where you can choose between declaring a variable auto or sigc::slot<>. I'll try to make it clearer.

Kjell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]