Skip to content

Do not use using namespace mv in headers#1245

Merged
alxvth merged 13 commits into
masterfrom
feature/NoUsingMvInHeaders
Jun 2, 2026
Merged

Do not use using namespace mv in headers#1245
alxvth merged 13 commits into
masterfrom
feature/NoUsingMvInHeaders

Conversation

@alxvth

@alxvth alxvth commented May 26, 2026

Copy link
Copy Markdown
Contributor

We should not write using namespace mv header files that others might consume since then they would unknowingly also use that namespace constantly.
This also follows the c++ core guideline Don’t write using namespace at global scope in a header file:

Reason: Doing so takes away an #includer’s ability to effectively disambiguate and to use alternatives. It also makes #included headers order-dependent as they might have different meaning when included in different orders

We have done this already across the core's public API, but the core and data plugins have not been as compliant.

This PR might break the build of some plugins, which will have to add using namespace mv back to their source.

I've tested:

All linked PRs in plugins do not depend on this PR (they are compatible with the current core), but are required after this PR is merged.

If there is no linked PR, the plugin does not need to be updated.

@alxvth alxvth force-pushed the feature/NoUsingMvInHeaders branch from d0ef38f to 786c874 Compare May 27, 2026 15:20
@alxvth alxvth merged commit 4674480 into master Jun 2, 2026
8 checks passed
@alxvth alxvth deleted the feature/NoUsingMvInHeaders branch June 2, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants