0029961: Foundation Classes - NCollection_Shared constructor passes arguments by...
authorkgv <kgv@opencascade.com>
Sun, 15 Jul 2018 08:35:12 +0000 (11:35 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 20 Jul 2018 13:56:24 +0000 (16:56 +0300)
New NCollection_Shared constructors taking arguments by reference have been added.

src/NCollection/NCollection_Shared.hxx

index f8125f2..78b13aa 100644 (file)
@@ -43,12 +43,22 @@ public:
   NCollection_Shared () {}
 
   //! Constructor with single argument
-  template <typename T1>
-  NCollection_Shared (T1 arg1) : T(arg1) {}
+  template<typename T1> NCollection_Shared (const T1& arg1) : T(arg1) {}
+
+  //! Constructor with single argument
+  template<typename T1> NCollection_Shared (T1& arg1) : T(arg1) {}
+
+  //! Constructor with two arguments
+  template<typename T1, typename T2> NCollection_Shared (const T1& arg1, const T2& arg2) : T(arg1, arg2) {}
+
+  //! Constructor with two arguments
+  template<typename T1, typename T2> NCollection_Shared (T1& arg1, const T2& arg2) : T(arg1, arg2) {}
+
+  //! Constructor with two arguments
+  template<typename T1, typename T2> NCollection_Shared (const T1& arg1, T2& arg2) : T(arg1, arg2) {}
 
   //! Constructor with two arguments
-  template <typename T1, typename T2>
-  NCollection_Shared (T1 arg1, T2 arg2) : T(arg1, arg2) {}
+  template<typename T1, typename T2> NCollection_Shared (T1& arg1, T2& arg2) : T(arg1, arg2) {}
 
 /* this could work...
   //! Forwarding constructor