VasuDevrani commented on PR #2313:
URL: https://github.com/apache/kvrocks/pull/2313#issuecomment-2115009633

   Two more concerns, then I'll move forward with `[[maybe_unused]]`:
   - it can make code a bit unreadable (especially if there's multiple unused 
params together)
   ```c
   void performOperation(const Config& config, [[maybe_unused]] int param1, 
[[maybe_unused]] double param2, [[maybe_unused]] const std::string& param3) {
       // Use only the 'config' parameter
       if (config.isEnabled()) {
           // Perform the operation
           // ...
       }
   }
   ```
   VS
   ```c
   void performOperation(const Config& config, int, double, const std::string&) 
{
       // Use only the 'config' parameter
       if (config.isEnabled()) {
           // Perform the operation
           // ...
       }
   }
   ```
   - supported for cpp 17+ (then again project cmake sets it at 17)


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

Reply via email to