You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The title of the issue is a bit of a mouthful, but you can see this in #330
The problem is that template code in the iosfwd header accesses members inside forward-declared templated types, i.e. the definition is not transitively included by iosfwd itself. Rather, some other header is responsible for making sure that the right definition is included if needed.
So you can have a situation like the following:
A.cpp only includes such a fwd-header (maybe it doesn't rely on any API inside). - When A.cpp is indexed, the fwd-header is also indexed.
B.cpp includes the header with the definition as well as the fwd-header. - When B.cpp is indexed, the fwd-header is skipped for indexing, since in terms of preprocessor effects, there is no change.
Had the fwd-header be included in B.cpp, the result of indexing would've been different.
I'm not sure about what the best way to address this is. One thing we could do is handle templates/dependent names differently, and don't perform the header skipping optimization for them. Later, we can merge information across headers. But this may cause a lot of temporary data to be generated due to heavy use of templates in stdlib headers. 🤕
The text was updated successfully, but these errors were encountered:
The title of the issue is a bit of a mouthful, but you can see this in #330
The problem is that template code in the iosfwd header accesses members inside forward-declared templated types, i.e. the definition is not transitively included by iosfwd itself. Rather, some other header is responsible for making sure that the right definition is included if needed.
So you can have a situation like the following:
A.cpp
only includes such a fwd-header (maybe it doesn't rely on any API inside). - When A.cpp is indexed, the fwd-header is also indexed.B.cpp
includes the header with the definition as well as the fwd-header. - When B.cpp is indexed, the fwd-header is skipped for indexing, since in terms of preprocessor effects, there is no change.Had the fwd-header be included in
B.cpp
, the result of indexing would've been different.I'm not sure about what the best way to address this is. One thing we could do is handle templates/dependent names differently, and don't perform the header skipping optimization for them. Later, we can merge information across headers. But this may cause a lot of temporary data to be generated due to heavy use of templates in stdlib headers. 🤕
The text was updated successfully, but these errors were encountered: