From: feedable <[email protected]>

const_derived_container seems to accept its arguments by-value, and then
tries to forward them, which doesn't make sense. Accept values by
universal reference instead.

gcc/ChangeLog:

        * iterator-utils.h: Pass constructor args by reference.
---
 gcc/iterator-utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/iterator-utils.h b/gcc/iterator-utils.h
index ea0759e83e72e..0a78c511a7b9f 100644
--- a/gcc/iterator-utils.h
+++ b/gcc/iterator-utils.h
@@ -115,7 +115,7 @@ public:
   const_derived_container () = default;
 
   template<typename... Ts>
-  explicit const_derived_container (Ts... args)
+  explicit const_derived_container (Ts &&...args)
     : BaseCT (std::forward<Ts> (args)...) {}
 
   const_iterator begin () const { return const_iterator (BaseCT::begin ()); }
-- 
2.54.0

Reply via email to