-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Get rid of using namespace libMesh;
in Moose.h
#28499
Labels
Comments
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 14, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/falcon
that referenced
this issue
Oct 15, 2024
Format code with clang format refs idaholab/moose#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 15, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 18, 2024
- declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 18, 2024
- heavily rely on using namespace libMesh - for some files, add libMesh:: everywhere refs idaholab#28499
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 18, 2024
GiudGiud
added a commit
to GiudGiud/moose
that referenced
this issue
Oct 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
We should never be putting a
using namespace
in the global scope in a header file. This pollutes the entire project and can create ambiguities between libMesh and other third party libraries. I just ran into a case where both libMesh and neml2 have aprint_helper
function with similar signatures. The neml2 version is called from within the neml2 namespace, but due to theusing namespace libMesh
directive inMoose.h
the libMesh version of that function now is an ambiguous alternative for the compiler.Design
A workaround would be to ask the NEML2 developer to explicitly add a scope resolution operator (call
neml2::print_helper
instead). But that would look redundant on the NEML2 side, and were asking someone else to fix a problem we created.I realize we have a ton on types and function that we pull in from the libMesh namespace (starting with simple things like
Real
ordof_id_type
), and addinglibMesh::
everytime we use those would clutter up our code. But we can be more specific with ourusing
statements (e.g.using libMesh::Real
inMooseTypes.h
etc.).This would be a laborious effort... #technicaldebt @loganharbour
Impact
Reduce global namespace pollution
The text was updated successfully, but these errors were encountered: