Skip to content

[Bug]: googletest/src/gtest-internal-inl.h contains C++ features #4752

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

Closed
a-a-Cat opened this issue Apr 27, 2025 · 1 comment
Closed

[Bug]: googletest/src/gtest-internal-inl.h contains C++ features #4752

a-a-Cat opened this issue Apr 27, 2025 · 1 comment

Comments

@a-a-Cat
Copy link

a-a-Cat commented Apr 27, 2025

Describe the issue

The file googletest/src/gtest-internal-inl.h contains C++ features such as classes, member functions, std::string, templates, auto, iterators and virtual functions, which are all not valid in C. It seems like the file should have a C++ header suffix, given how all these features are valid in C++.

Steps to reproduce the problem

Compile the file using any standard-compliant C compiler.

What version of GoogleTest are you using?

1.16.0

What operating system and version are you using?

Ubuntu 22.04.5 LTS

What compiler and version are you using?

GCC 13.1.0

What build system are you using?

I guess Bash if that counts.

Additional context

This could be fixed by simply renaming the file to a C++ header suffix such as .hpp or .hh.

@derekmauro
Copy link
Member

This is consistent with the Google C++ Style Guide, so it is not going to change.

https://google.github.io/styleguide/cppguide.html#Header_Files

@derekmauro derekmauro closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2025
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