ketor commented on code in PR #2576:
URL: https://github.com/apache/brpc/pull/2576#discussion_r1537060645


##########
src/brpc/protocol.cpp:
##########
@@ -18,13 +18,21 @@
 
 // Since kDefaultTotalBytesLimit is private, we need some hacks to get the 
limit.
 // Works for pb 2.4, 2.6, 3.0
+#include "google/protobuf/stubs/common.h"
+#if GOOGLE_PROTOBUF_VERSION < 4022000

Review Comment:
   
实际上是brpc的用法的问题,但只会在新版本的protobuf里报错。新版本的protobuf的common.h里include了std的一个头文件,导致#define
 private public的时候会把标准库头文件里的结构给改成public,然后编译器检测到之后会报错。
   在3.21以及更老的protobuf版本上没有这个问题。
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to