Huoke opened a new issue, #2882:
URL: https://github.com/apache/brpc/issues/2882

   **Describe the bug (描述bug)**
   scoped_lock.h 中自定义区域锁宏时, 在不支持C++11特性的编译分支分支中引入 std::lock_guard 是否合理?
   在不支持c++11的场景下使用 std::lock_guard 是否合理?
   **To Reproduce (复现方法)**
   代码逻辑,无需复现
   **Expected behavior (期望行为)**
   请帮忙解释一下在低于C++11的环境下,这里的std::loc_guard是在哪里定义的?
   **Versions (各种版本)**
   OS: linux
   Compiler: gcc
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   代码上下文:
   ```c++
   #if !defined(BUTIL_CXX11_ENABLED)
   #define BAIDU_SCOPED_LOCK(ref_of_lock)                                  \
       std::lock_guard<BAIDU_TYPEOF(ref_of_lock)>                          \
       BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
   #else
   ```


-- 
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.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