chenBright commented on code in PR #2859:
URL: https://github.com/apache/brpc/pull/2859#discussion_r1901494811


##########
src/butil/object_pool.h:
##########
@@ -75,21 +75,10 @@ template <typename T> inline bool local_pool_free_empty() {
 }
 
 // Get an object typed |T|. The object should be cleared before usage.
-// NOTE: T must be default-constructible.
-template <typename T> inline T* get_object() {
-    return ObjectPool<T>::singleton()->get_object();
-}
-
-// Get an object whose constructor is T(arg1)
-template <typename T, typename A1>
-inline T* get_object(const A1& arg1) {
-    return ObjectPool<T>::singleton()->get_object(arg1);
-}
-
-// Get an object whose constructor is T(arg1, arg2)
-template <typename T, typename A1, typename A2>
-inline T* get_object(const A1& arg1, const A2& arg2) {
-    return ObjectPool<T>::singleton()->get_object(arg1, arg2);
+// NOTE: If there are no arguments, T must be default-constructible.
+template <typename T, typename... Args>
+inline T* get_object(Args... args) {

Review Comment:
   是的,搞漏了,我提个PR修一下。



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