Commit 221b2a0
Change how we decide which empty string implementation to use. (#20708)
The feature macro seems to be lying on some toolchains. Instead, ask the
compiler to try to run the default constructor in constexpr context which
should fail if the implementation doesn't actually support it and fallback to
the dynamic one.
This should fix #20645
PiperOrigin-RevId: 737603382
Co-authored-by: Protobuf Team Bot <[email protected]>1 parent a4beda2 commit 221b2a0
2 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
505 | 513 | | |
506 | 514 | | |
507 | 515 | | |
508 | | - | |
509 | | - | |
510 | | - | |
| 516 | + | |
| 517 | + | |
511 | 518 | | |
512 | 519 | | |
513 | 520 | | |
| |||
519 | 526 | | |
520 | 527 | | |
521 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
522 | 534 | | |
523 | | - | |
524 | 535 | | |
525 | 536 | | |
526 | 537 | | |
| |||
0 commit comments