1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2026-10-23 17:08:55 +03:00

Fix gcc build of DatagramFlowManager nested queue types (#467)

Summary:
gcc fails to compile this header because the F14FastMap member instantiates traits over QueuedDatagram and DatagramFlowQueue while their default member initializers are still being parsed, so the implicitly defaulted constructors are not usable yet. Give both structs a user-provided `{}` default constructor instead of `= default`, which delays the constructor definition until the enclosing class is complete. Construction behavior is unchanged: the member initializers still supply the same defaults.

Pull Request resolved: https://github.com/facebook/mvfst/pull/467

Reviewed By: mjoras

Differential Revision: D116639157

Pulled By: jbeshay

fbshipit-source-id: 6a787c8804284ff4895b4147d6f5a0dfc4d9583a
This commit is contained in:
afrind
2026-08-19 13:59:50 -07:00
committed by meta-codesync[bot]
parent c70094d832
commit effe6b3758

View File

@@ -33,6 +33,10 @@ class DatagramFlowManager {
// reach back to age it, and a flow that never sets one never reads the
// clock.
struct QueuedDatagram {
// User-provided, not `= default`: writeBuffer_ instantiates F14FastMap over
// these nested types before gcc has evaluated their member initializers.
QueuedDatagram() {}
BufQueue buf;
TimePoint enqueueTime{TimePoint::max()};
// Orders this datagram against others in the same flow; lower is sent
@@ -51,7 +55,8 @@ class DatagramFlowManager {
// popped. Set by closeFlow(), and at creation for ephemeral flows.
bool draining{false};
DatagramFlowQueue() = default;
DatagramFlowQueue() {} // Not `= default`; see QueuedDatagram above.
~DatagramFlowQueue() = default;
// Move-only