-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
build: switch to C++23 #61132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
build: switch to C++23 #61132
Conversation
|
Review requested:
|
|
Shows an error in quic code (@jasnell): |
|
I opened ngtcp2/ngtcp2#1970 for the ngtcp2 error. |
|
temporary workaround. Aside from this, there are no other problems, and it compiles successfully. diff --git a/src/quic/streams.h b/src/quic/streams.h
index c230815d78e..3c9fb100219 100644
--- a/src/quic/streams.h
+++ b/src/quic/streams.h
@@ -292,7 +292,12 @@ class Stream final : public AsyncWrap,
struct PendingHeaders;
class Outbound;
-
+
+
+ struct OutboundDeleter {
+ void operator() (Outbound* ptr) const;
+ };
+
// Gets a reader for the data received for this stream from the peer,
BaseObjectPtr<Blob::Reader> get_reader();
@@ -335,7 +340,7 @@ class Stream final : public AsyncWrap,
AliasedStruct<Stats> stats_;
AliasedStruct<State> state_;
BaseObjectWeakPtr<Session> session_;
- std::unique_ptr<Outbound> outbound_;
+ std::unique_ptr<Outbound, OutboundDeleter> outbound_;
std::shared_ptr<DataQueue> inbound_;
// If the stream cannot be opened yet, it will be created in a pending state.
diff --git a/src/quic/streams.cc b/src/quic/streams.cc
index 8fe5b72ce1f..8fa9c264c4f 100644
--- a/src/quic/streams.cc
+++ b/src/quic/streams.cc
@@ -739,6 +739,11 @@ class Stream::Outbound final : public MemoryRetainer {
size_t uncommitted_ = 0;
};
+
+void Stream::OutboundDeleter::operator() (Stream::Outbound* ptr) const {
+ delete ptr;
+}
+
// ============================================================================
#define V(name, key, no_side_effect) \
@@ -1038,7 +1043,7 @@ void Stream::set_outbound(std::shared_ptr<DataQueue> source) {
if (!source || !is_writable()) return;
Debug(this, "Setting the outbound data source");
DCHECK_NULL(outbound_);
- outbound_ = std::make_unique<Outbound>(this, std::move(source));
+ outbound_ = std::unique_ptr<Outbound, OutboundDeleter>(new Outbound(this, std::move(source)));
state_->has_outbound = 1;
if (!is_pending()) session_->ResumeStream(id());
}
|
Following Chromium. Closes: nodejs#61125 Refs: https://issues.chromium.org/issues/388070065
|
is this planned to be backported to v25 and v24 as well or it stays for v26 only? |
|
@nodejs/quic PTAL at #61132 (comment). |
Following Chromium.
Closes: #61125
Refs: https://issues.chromium.org/issues/388070065