This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++-4.5 vs dwarf branch


> I cleaned up/split and rebased the commits as we discussed and pushed to
> the dwarf branch.

Cool, thanks.  One nit:

+	    attributes_type t_attrs = attributes_type (die.attributes (), arg);

Write this instead:

	attributes_type t_attrs (die.attributes (), arg);

I'm not really sure if the = form actually constructs a temporary and calls
operator=, but I wouldn't be surprised if it did.  AIUI, in general C++
discourages = initializers for class objects.

> Jason explained it to me as: 4.5 corrected arg-dep lookup to include
> template args in the list of associated classes.  When you say i !=
> _base::end(), it needs to look up the != operator, and
> argument-dependent lookup for an argument of type
> std::vector<std::pair<const debug_info_entry, die_info>*>::iterator
> wants to look into pair<const debug_info_entry,die_info>, but it can't
> instantiate it because die_info is incomplete.

None of that really helps me understand the crux of the issue.
That is, why does instantiating std::vector<foo *> have to instantiate foo?
There is no use of "*element" inside the template, so just knowing that
the template type parameter is some pointer type ought to suffice.
But I never really expected to understand C++ "logic".


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]