"using namespace" in header files

Bug #1503636 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Triaged
Low
Unassigned
mir (Ubuntu)
Triaged
Low
Unassigned

Bug Description

"Do not use a using-directive in a header file. " - https://unity.ubuntu.com/mir/cppguide/index.html?showone=Namespaces#Namespaces

$ find . -name \*.h | xargs grep "using namespace"
./tests/unit-tests/graphics/android/hwc_struct_helpers.h: using namespace testing;
./tests/include/mir/test/doubles/mock_hwc_composer_device_1.h: using namespace testing;
./tests/include/mir/test/doubles/mock_client_context.h: using namespace testing;
./tests/include/mir/test/doubles/mock_buffer.h: using namespace testing;
./tests/include/mir/test/doubles/mock_buffer.h: using namespace testing;
./tests/include/mir/test/doubles/mock_display_buffer.h: using namespace testing;
./tests/include/mir/test/doubles/mock_android_native_buffer.h: using namespace testing;
./tests/include/mir/test/doubles/mock_hwc_device_wrapper.h: using namespace testing;
./tests/include/mir/test/doubles/stub_display_builder.h: using namespace testing;
./tests/include/mir/test/doubles/mock_platform_ipc_operations.h: using namespace testing;
./tests/include/mir/test/doubles/mock_frontend_surface.h: using namespace testing;
./tests/include/mir/test/doubles/mock_android_alloc_device.h: using namespace testing;
./tests/include/mir/test/doubles/mock_window_handle_repository.h: using namespace testing;
./tests/include/mir_test_framework/testing_server_configuration.h:using namespace mir;
./tests/include/mir_test_framework/stubbed_server_configuration.h:using namespace mir;
./tests/include/mir_test_framework/client_platform_factory.h: using namespace testing;
./tests/include/mir_test_framework/client_platform_factory.h: using namespace testing;
./src/server/scene/prompt_session_container.h:using namespace boost::multi_index;
./src/include/server/mir/frontend/template_protobuf_message_processor.h: using namespace std::literals::string_literals;
./include/test/mir/test/doubles/mock_window_manager.h: using namespace ::testing;

Changed in mir:
status: New → Triaged
Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.