chenBright commented on code in PR #3346: URL: https://github.com/apache/brpc/pull/3346#discussion_r3409769474
########## test/sstream_workaround.h: ########## @@ -21,13 +21,22 @@ // defining private as public makes it fail to compile sstream with gcc5.x like this: // "error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>:: // __xfer_bufptrs’ redeclared with different access" +// +// Similarly, std::any in C++17 uses private access specifiers internally that +// would break with -Dprivate=public. Include it here before the macro takes effect. #ifdef private # undef private # include <sstream> +# if __cplusplus >= 201703L +# include <any> +# endif # define private public Review Comment: Using `-fno-access-control` instead of `# define private public`? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
