diff options
author | 2023-12-18 12:37:32 -0800 | |
---|---|---|
committer | 2023-12-18 12:38:18 -0800 | |
commit | 8900d7c496afb0fb0e0a737d001a46828bc446dd (patch) | |
tree | c89237017baee1e83f54a7f09ff7c4ddf9bbe664 /absl/container/internal/hash_policy_traits_test.cc | |
parent | d22aa4df3f530872d4e11e3906c9c6e002deefca (diff) |
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/container/internal/hash_policy_traits_test.cc')
0 files changed, 0 insertions, 0 deletions