Skip to content

Remove using namespace amrex (1)#550

Merged
jrood-nrel merged 12 commits intoAMReX-Combustion:developmentfrom
jrood-nrel:jrood/namespace
Aug 13, 2025
Merged

Remove using namespace amrex (1)#550
jrood-nrel merged 12 commits intoAMReX-Combustion:developmentfrom
jrood-nrel:jrood/namespace

Conversation

@jrood-nrel
Copy link
Copy Markdown
Contributor

@jrood-nrel jrood-nrel commented Aug 12, 2025

I'm not liking all the inconsistency so trying to fix all of it.

@jrood-nrel jrood-nrel requested a review from baperry2 August 12, 2025 22:48
@baperry2
Copy link
Copy Markdown
Collaborator

The convention that is nominally followed is using namepace amrex is allowed in .cpp files to reduce verbosity from all the amrex:: on the variable types, but not in .H files, where that may cause unexpected namespace collisions in files that include that .H. This is similar to ERF and some other AMReX codes I believe.

I'm open to either way. Using the namespace where possible does make the code less verbose and more readable. But if we do it in cpp but not H, it makes it annoying when moving code back and forth between them.

@jrood-nrel
Copy link
Copy Markdown
Contributor Author

I definitely think we should remove using namespace amrex. It makes the code inconsistent. It also makes it less readable in my opinion since you have to guess where things are coming from.

@jrood-nrel jrood-nrel merged commit 70c173a into AMReX-Combustion:development Aug 13, 2025
24 checks passed
@jrood-nrel jrood-nrel deleted the jrood/namespace branch August 13, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants