diff options
author | Abseil Team <absl-team@google.com> | 2023-12-18 12:37:32 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-18 12:38:18 -0800 |
commit | 8900d7c496afb0fb0e0a737d001a46828bc446dd (patch) | |
tree | c89237017baee1e83f54a7f09ff7c4ddf9bbe664 /absl/algorithm | |
parent | d22aa4df3f530872d4e11e3906c9c6e002deefca (diff) | |
download | abseil-8900d7c496afb0fb0e0a737d001a46828bc446dd.tar.gz abseil-8900d7c496afb0fb0e0a737d001a46828bc446dd.tar.bz2 abseil-8900d7c496afb0fb0e0a737d001a46828bc446dd.zip |
Mutex: Fix Condition pointer-to-member cast to respect const qualifier
Previously, `absl::Condition` incorrectly used the same (non-`const`)
pointer-to-method type when wrapping both `const` and non-`const` methods.
Unfortunately, this is undefined behavior according to `[expr.reinterpret.cast]`
in the C++ standard:
> The effect of calling a function through a pointer to a function type that is
> not the same as the type used in the definition of the function is undefined.
This fixes the UB.
PiperOrigin-RevId: 591981682
Change-Id: Iaca955346699417232383d3a1800ea9b82ea5761
Diffstat (limited to 'absl/algorithm')
0 files changed, 0 insertions, 0 deletions