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

inline gtest print support function defns #237

Merged
merged 2 commits into from Jan 31, 2020

Conversation

wilsonqin
Copy link
Contributor

We have some application code including faster.h, and found that inline definitions for the new gtest print support functions reduce our build situations of linker error for multiple defns. There is a decent chance for collisions on the "<<" operator defn depending on what other c++ libraries are included in the application code.

Linux, C++, g++ 7.4

@badrishc
Copy link
Contributor

Thanks, Wilson. @Skyprophet, any comments?

@dongx-psu
Copy link
Contributor

It is reasonable, I would merge it.

P.s. Modern compilers are usually smart enough to inline them with higher optimization.

@badrishc badrishc merged commit 8f9cf2c into microsoft:master Jan 31, 2020
@wilsonqin
Copy link
Contributor Author

@Skyprophet, thank you for the feedback.
I thought compiler optimization would resolve too. Was using -O2 on the application.
In some builds we have a multiple header include - perhaps that could complicate the optimization.

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.

None yet

3 participants