[PATCH] Add C++ wrappers for iterating through various libdw and libdwfl objects
Josh Stone
jistone at redhat.com
Fri Mar 27 16:20:39 UTC 2015
I haven't done a full review, but I can answer one of your questions:
On 03/27/2015 07:13 AM, Mark Wielaard wrote:
>> + cu_iterator
>> + operator++ ()
>> + {
>> + move ();
>> + return *this;
>> + }
>> +
>> + cu_iterator
>> + operator++ (int)
>> + {
>> + cu_iterator tmp = *this;
>> + ++*this;
>> + return tmp;
>> + }
>
> This is just idiom for implementing it++?
> While the above is the ++it implementation?
> (I don't understand the (int))
That's a dummy parameter to distinguish pre- and post-increment. See
http://en.cppreference.com/w/cpp/language/operator_incdec for example.
That page also notes that prefix forms usually return by reference.
That's not required, but any particular reason it's by value here?
More information about the elfutils-devel
mailing list