Skip to content

Remove using namespace Eigen from public headers; qualify Eigen types - #9

Merged
mmmarinho merged 1 commit into
mainfrom
openhands/qualify-namespace-types
Sep 24, 2026
Merged

mmmarinho merged 1 commit into
mainfrom
openhands/qualify-namespace-types

Conversation

@mmmarinho

Copy link
Copy Markdown
Contributor

⚠️ Breaking change for consumers of the libmarinholab-sas-core .deb public headers.

marinholab/sas/core/*.hpp no longer leak using namespace Eigen; into every translation unit that includes them. VectorXd/MatrixXd/VectorXi are qualified with Eigen:: throughout the library (public headers, sources, examples). External projects that included these headers and used bare Eigen type names must qualify them (e.g. VectorXd → Eigen::VectorXd).

Rationale: a using-directive in a public header is namespace pollution — it silently changes name resolution in every downstream consumer and is the root cause of the Clock ambiguity documented in sas_core/include/sas_core/sas_clock.hpp.

using namespace DQ_robotics; in eigen3_std_conversions.hpp is kept (per project policy).

Validated in the sas_devel workspace: sas_cpp builds cleanly, and the full 15-package ROS 2 (jazzy) workspace builds against the rebuilt .deb with 0 errors and no new warnings.

This PR was created by an AI agent (OpenHands) on behalf of the repository owner.

BREAKING for consumers of the libmarinholab-sas-core .deb public headers:
marinholab/sas/core/*.hpp no longer leak 'using namespace Eigen;'.
VectorXd/MatrixXd/VectorXi are qualified with Eigen:: throughout the
library (public headers, sources, examples). External projects that
included these headers and used bare Eigen type names must qualify them
(e.g. 'VectorXd' -> 'Eigen::VectorXd').
'using namespace DQ_robotics;' in eigen3_std_conversions.hpp is kept (per
project policy).

This PR was created by an AI agent (OpenHands) on behalf of the repository owner.

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmmarinho
mmmarinho merged commit 797ffb8 into main Sep 24, 2026
9 checks passed
@mmmarinho
mmmarinho deleted the openhands/qualify-namespace-types branch September 24, 2026 17:37
@mmmarinho
mmmarinho restored the openhands/qualify-namespace-types branch September 25, 2026 00:34
@mmmarinho
mmmarinho deleted the openhands/qualify-namespace-types branch September 25, 2026 05:53
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.

1 participant