Refactor the way we turn on the optimization in StrongPointer.
commit5b8e90f4041e7e643aae47b8d1c1fb98e7250c6a
authorProtobuf Team Bot <protobuf-github-bot@google.com>
Fri, 17 May 2024 15:36:07 +0000 (17 08:36 -0700)
committerCopybara-Service <copybara-worker@google.com>
Fri, 17 May 2024 15:44:35 +0000 (17 08:44 -0700)
tree2a4ca2452ce05bfec02199a6583eaea7b88c76fe
parent2f3242c576504459621fd7d78bbccf39bfaa49c5
Refactor the way we turn on the optimization in StrongPointer.
Some versions of gcc seem to advertise __cpp_nontype_template_args but not
support the argument in some cases.
Only attempt the template parameter if we are using the optimized .reloc
approach.

Fixes https://github.com/protocolbuffers/protobuf/issues/16868

PiperOrigin-RevId: 634787159
src/google/protobuf/port.h