Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache.cpp introduces an ODR violation (with tf's cache.cpp) #175

Closed
macmason opened this issue May 11, 2016 · 3 comments
Closed

cache.cpp introduces an ODR violation (with tf's cache.cpp) #175

macmason opened this issue May 11, 2016 · 3 comments

Comments

@macmason
Copy link

TF builds a cache.cpp, which defines (among other things) createExtrapolationException1. For some reason, these are defined in the global namespace.

TF2 defines the same functions, again in the global namespace. As TF depends on TF2, this is an ODR violation, so any call into these functions is undefined behavior.

@macmason
Copy link
Author

I can fix this by using a "namespace tf2 { ... }" rather than a "using namespace tf2" in cache.cpp. Presumably, we'll fallen afoul of some esoteric C++ name lookup rule.

@tfoote
Copy link
Member

tfoote commented May 11, 2016

Thanks for catching that. I've made it explicit in #176 does that work for you?

@macmason
Copy link
Author

Sure does. One nitpick on the change itself.

tfoote added a commit that referenced this issue May 13, 2016
kheaactua pushed a commit to kheaactua/conan-tf2 that referenced this issue Dec 22, 2018
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

No branches or pull requests

2 participants