Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniquely specify namespace #9737

Merged
merged 1 commit into from Mar 26, 2020

Conversation

gassmoeller
Copy link
Member

This PR fixes a bug that only appears when trying to combine and collectively compile deal.II header files (like we do in ASPECT using cotire). Using the namespace parallel::internal in include/deal.II/lac/vector_operations_internal.h leads to errors of the form: namespace dealii::internal::parallel::internal not declared when including the combined header (tested with gcc 9.2.1). Of course we are really looking for the namespace dealii::parallel::internal but the namespace lookup gets confused. I suspect this is because there is a namespace dealii::internal::parallel declared in distributed/cell_data_transfer.templates.h and we are inside dealii::internal when starting this lookup, which is why the compiler ends up in the wrong namespace. This PR removes the compiler errors by fully referencing the namespace. I suspect this problem appeared before, because most other references in this file to this particular namespace already include the leading ::dealii::.

@drwells
Copy link
Member

drwells commented Mar 26, 2020

This looks fine, but could you add a comment describing the problem to the first usage?

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all in an internal file. Let's not worry about adding a comment -- it's not clear where it should be anyway, and it doesn't make sense to reproduce the same comment in all places where @gassmoeller is making the change.

@bangerth
Copy link
Member

/rebuild

@masterleinad masterleinad merged commit 6eec83b into dealii:master Mar 26, 2020
@gassmoeller gassmoeller deleted the specify_unique_namespace branch March 26, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants