Skip to content

Commit 9803196

Browse files
authored
[libc++][NFC] Fix unparenthesized comma expression in mem-initializer (#89605)
#84050 resolves class member access expressions naming members of the current instantiation prior to instantiation. In testing, it has revealed a mem-initializer in the move constructor of `invocable_with_telemetry` that uses an unparenthesized comma expression to initialize a non-static data member of pointer type. This patch fixes it.
1 parent 1fb3ea6 commit 9803196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/support/invocable_with_telemetry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class invocable_with_telemetry {
3131
constexpr invocable_with_telemetry(invocable_with_telemetry&& other)
3232
requires std::move_constructible<F>
3333
: f_(std::move(other.f_)),
34-
telemetry_(assert(other.telemetry_ != nullptr), std::exchange(other.telemetry_, nullptr)) {
34+
telemetry_((assert(other.telemetry_ != nullptr), std::exchange(other.telemetry_, nullptr))) {
3535
++telemetry_->moves;
3636
}
3737

0 commit comments

Comments
 (0)