http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46836
--- Comment #2 from froydnj at codesourcery dot com <froydnj at codesourcery dot com> 2010-12-07 15:49:15 UTC --- On Tue, Dec 07, 2010 at 03:31:22PM +0000, redi at gcc dot gnu.org wrote: > It's not entirely trivial, because e.g. std::tuple_size is declared in more > than one place, and we have internal helpers which might be in namespace std > but probably don't want to be reported as being part of any standard header, > but I'd love to see this. Wow, what entirely trivial implementation are you thinking of? :) I guess you could augment the compiler to maintain an identifier->header mapping, but I was thinking about doing it entirely on-the-fly, which already strikes me as non-trivial. (Identifiers declared in more that one place and/or not in their intended header, etc.) > If there's anything we can add to the libstdc++ headers to help this please > let > us know, I'd be happy to work on that. I'll do that, though I'm not planning on working on this right now. The only thing that comes to mind is something like: #pragma GCC canonical_header [header-name] [identifier] but that's just one idea from two minutes of thinking about it.