kernel: IdString:in() to use perfect forwarding
authorEddie Hung <eddie@fpgeh.com>
Thu, 12 Mar 2020 21:41:27 +0000 (14:41 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 2 Apr 2020 14:14:08 +0000 (07:14 -0700)
kernel/rtlil.h

index 7c1523f0bbef235bc4703731b72ff7c19f51316c..1283db1344340dc0bac119ed59c0d1209fbd61e5 100644 (file)
@@ -359,8 +359,8 @@ namespace RTLIL
                // of cell types). the following functions helps with that.
 
                template<typename T, typename... Args>
-               bool in(T first, Args... rest) const {
-                       return in(first) || in(rest...);
+               bool in(T first, Args&&... rest) const {
+                       return in(first) || in(std::forward<Args>(rest)...);
                }
 
                bool in(IdString rhs) const { return *this == rhs; }