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

Let GOOGLE_COMPILE_ASSERT use static_assert if available. #621

Merged
merged 1 commit into from
Jul 21, 2015

Conversation

nico
Copy link
Contributor

@nico nico commented Jul 17, 2015

The motivation is that gcc 4.8+ and clang trunk warn on unused local
typedefs, which COMPILE_ASSERT adds. After this change, the warning
will be happy at least in C++11 builds. static_assert also produces a
slighly nicer diagnostic than the typedef method.

google/re2@eb93e8b
did the same change in re2.

The motivation is that gcc 4.8+ and clang trunk warn on unused local
typedefs, which COMPILE_ASSERT adds. After this change, the warning
will be happy at least in C++11 builds. static_assert also produces a
slighly nicer diagnostic than the typedef method.

google/re2@eb93e8b
did the same change in re2.
@nico nico changed the title Let COMPILE_ASSERT use static_assert if available. Let GOOGLE_COMPILE_ASSERT use static_assert if available. Jul 17, 2015
@nico
Copy link
Contributor Author

nico commented Jul 17, 2015

I'm going to merge this in Chromium: https://codereview.chromium.org/1242603003/

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 17, 2015

@pherl to review this.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 17, 2015

The change looks good to me. @pherl is working on refactoring these header files and we may need to hold this PR until the refactoring is done.

@liujisi
Copy link
Contributor

liujisi commented Jul 17, 2015

LGTM

liujisi added a commit that referenced this pull request Jul 21, 2015
Let GOOGLE_COMPILE_ASSERT use static_assert if available.
@liujisi liujisi merged commit d119a27 into protocolbuffers:master Jul 21, 2015
@nico nico deleted the staticass branch July 22, 2015 00:59
JulienIsorce pushed a commit to Samsung/ChromiumGStreamerBackend that referenced this pull request Jul 27, 2015
This merges protocolbuffers/protobuf#621

BUG=411648

Review URL: https://codereview.chromium.org/1242603003

Cr-Commit-Position: refs/heads/master@{#339353}
scheib pushed a commit to scheib/chromium that referenced this pull request Jul 27, 2015
This merges protocolbuffers/protobuf#621

BUG=411648

Review URL: https://codereview.chromium.org/1242603003

Cr-Commit-Position: refs/heads/master@{#339353}
adellahlou pushed a commit to adellahlou/protobuf that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants