Xpetra: using statement in global namespace
Created by: jhux2
Reported by @jmgate: I pulled Trilinos today for the first time since commit 279ddfeb (about two weeks ago) and ran into the following build problem:
[ 83%] Building CXX object packages/panzer/adapters-stk/src/CMakeFiles/panzer-stk.dir/responses/Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.cpp.o
In file included from /build/Packages/jmgateTrilinos/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrix.hpp:55:0,
from /build/Packages/jmgateTrilinos/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix.hpp:56,
from /build/Packages/jmgateTrilinos/packages/muelu/src/Interface/../Utils/MueLu_Utilities_decl.hpp:59,
from /build/Packages/build/forked-mpi-drekar/packages/muelu/src/MueLu_Utilities.hpp:1,
from /build/Packages/jmgateTrilinos/packages/muelu/src/Interface/../MueCentral/MueLu_Level.hpp:68,
from /build/Packages/jmgateTrilinos/packages/muelu/adapters/xpetra/MueLu_XpetraOperator_decl.hpp:53,
from /build/Packages/jmgateTrilinos/packages/muelu/adapters/stratimikos/Thyra_XpetraLinearOp_def.hpp:54,
from /build/Packages/jmgateTrilinos/packages/muelu/adapters/stratimikos/Thyra_XpetraLinearOp.hpp:2,
from /build/Packages/jmgateTrilinos/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_decl.hpp:57,
from /build/Packages/jmgateTrilinos/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory.hpp:1,
from /build/Packages/jmgateTrilinos/packages/piro/src/Piro_InvertMassMatrixDecorator_Def.hpp:62,
from /build/Packages/jmgateTrilinos/packages/piro/src/Piro_InvertMassMatrixDecorator.hpp:165,
from /build/Packages/jmgateTrilinos/packages/piro/src/Piro_RythmosSolver_Def.hpp:76,
from /build/Packages/jmgateTrilinos/packages/piro/src/Piro_RythmosSolver.hpp:203,
from /build/Packages/jmgateTrilinos/packages/panzer/adapters-stk/src/Panzer_STK_ModelEvaluatorFactory_impl.hpp:110,
from /build/Packages/jmgateTrilinos/packages/panzer/adapters-stk/src/Panzer_STK_ModelEvaluatorFactory.cpp:46:
/build/Packages/jmgateTrilinos/packages/xpetra/src/CrsGraph/Xpetra_CrsGraph.hpp:61:16: error: ‘ParameterList’ is already declared in this scope
using Teuchos::ParameterList;
^~~~~~~~~~~~~
make[2]: *** [packages/panzer/adapters-stk/src/CMakeFiles/panzer-stk.dir/Panzer_STK_ModelEvaluatorFactory.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [packages/panzer/adapters-stk/src/CMakeFiles/panzer-stk.dir/all] Error 2
make: *** [all] Error 2
I took a look at Xpetra_CrsGraph.hpp, and it looks like @jhux2 was the one to last touch that line 61, though that was five years ago. I can't find in the commits since 279ddfeb where Teuchos::ParameterList wound up inserted into the global namespace again. Regardless, could we move that using statement inside the Xpetra namespace? Getting it out of the global namespace solves my build problem.