Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23399

Remove usage of using-directives and using-declarations declared with namespace scope in header files

    • ALL

      These pollute the namespace they are declared in, for all source files that include these headers (directly or indirectly).

      Preliminary list here:

      $ find src/mongo -name '*.h' | grep -v stdx/ | grep -v platform/ | xargs git grep -E '^using [^n][^=]*::'
      src/mongo/client/fetcher.h:using executor::RemoteCommandRequest;
      src/mongo/db/exec/text.h:using std::unique_ptr;
      src/mongo/db/exec/text.h:using std::vector;
      src/mongo/db/exec/text.h:using fts::FTSQueryImpl;
      src/mongo/db/exec/text.h:using fts::FTSSpec;
      src/mongo/db/exec/text_match.h:using std::unique_ptr;
      src/mongo/db/exec/text_match.h:using fts::FTSMatcher;
      src/mongo/db/exec/text_match.h:using fts::FTSQueryImpl;
      src/mongo/db/exec/text_match.h:using fts::FTSSpec;
      src/mongo/db/exec/text_or.h:using std::unique_ptr;
      src/mongo/db/exec/text_or.h:using std::vector;
      src/mongo/db/exec/text_or.h:using fts::FTSSpec;
      src/mongo/db/field_parser-inl.h:using mongoutils::str::stream;
      src/mongo/dbtests/dbtests.h:using std::shared_ptr;
      src/mongo/util/concurrency/threadlocal.h:using boost::thread_specific_ptr;
      src/mongo/util/log.h:using logger::LogstreamBuilder;
      src/mongo/util/log.h:using logger::LabeledLevel;
      src/mongo/util/log.h:using logger::Tee;
      src/mongo/util/time_support.h:using stdx::chrono::duration_cast;
      $ find src/mongo -name '*.h' | grep -v stdx/ | grep -v platform/ | xargs git grep -E '^using namespace'
      src/mongo/db/storage/paths.h:using namespace mongoutils;
      src/mongo/dbtests/dbtests.h:using namespace mongo;
      src/mongo/dbtests/dbtests.h:using namespace mongo::unittest;
      src/mongo/util/mongoutils/str.h:using namespace mongoutils;
      

            Assignee:
            backlog-server-devtools DO NOT USE - Backlog - Dev Tools
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: