Skip to content

Avoid namespace ambiguity#2

Open
Felix-El wants to merge 1 commit intomeyerj:fix-1343-melodic-devel-3from
Felix-El:fix-1343-melodic-devel-3
Open

Avoid namespace ambiguity#2
Felix-El wants to merge 1 commit intomeyerj:fix-1343-melodic-devel-3from
Felix-El:fix-1343-melodic-devel-3

Conversation

@Felix-El
Copy link

Hi,

thanks for sharing the patch. I'm trying it locally.

However, I've faced issues compiling one existing node with the patched roscpp: the node defines a time_point at global scope and later, when condition_variable.h is included through a chain of other include files, we have an ambiguity there.

It sure is not good practice to have stuff at global scope but still, to avoid the issue for others, I'd propose to get rid of 'using namespace boost::chrono;' in favor of a namespace alias.

Guess I just learned that even scoped 'using namespace ...' is not great for use in header files, since the environment we're compiling in is controlled by the includer.

Best Regards

-Felix

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