aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-03 13:54:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-03 14:08:16 +0200
commit70bd99294d2054a69329c362a4c2d6f4bd0714b3 (patch)
tree1c3e839b53d91bc228bc409787cf5defe523010e
parent4a07d69c995ed429f52ca66a83c0eea0b679dc8b (diff)
Add missing copy constructor
We have a copy assigned operator and without the corresponding copy constructor we get a -Wdeprecated-copy warning with newer GCC versions. Instead of adding the copy constructor we could have also dropped the copy assignment since it is identical to what would be implied. It's not, however, clear why it was added in the first place (it was added before we started tracking development with git). Chances are, some old and broken compiler is confused by the other assignment operator. So to be on the safe side we rather add the copy constructor.
-rw-r--r--libxsde/xsde/cxx/hybrid/sequence.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/hybrid/sequence.hxx b/libxsde/xsde/cxx/hybrid/sequence.hxx
index b7e6f3e..b5523d0 100644
--- a/libxsde/xsde/cxx/hybrid/sequence.hxx
+++ b/libxsde/xsde/cxx/hybrid/sequence.hxx
@@ -412,6 +412,11 @@ namespace xsde
{
}
+ var_const_iterator (const var_const_iterator& j)
+ : i_ (j.i_)
+ {
+ }
+
var_const_iterator (var_iterator<T> j)
: i_ (const_cast<const T**> (j.i_))
{