镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Avoid using-directives in the global scope in headers #3326

Description

@vkucera

Using-directives should never appear in the global scope in headers because they irreversibly pollute the global namespace wherever they are included and can lead to unexpected behaviour, such as name conflicts. See O2 CodingGuidelines, C++ Core Guidelines.

Activity

  1. vkucera commented on Aug 15, 2023

    @vkucera
    CollaboratorAuthor
  2. vkucera commented on Oct 14, 2023

    @vkucera
    CollaboratorAuthor
  3. pinned this issue on Apr 11, 2024
  4. vkucera commented on Aug 1, 2024

    @vkucera
    CollaboratorAuthor
  5. changed the title [-]Avoid using-directives in headers[/-] [+]Avoid using-directives in the global scope in headers[/+] on Jan 22, 2025
  6. reopened this on Apr 7, 2025
  7. reopened this on Sep 2, 2025
  8. vkucera commented on Sep 3, 2025

    @vkucera
    CollaboratorAuthor
  9. assigned and unassigned on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions