@@ -914,30 +914,6 @@ namespace libsemigroups {
914914 _tmp_lambda_value(),
915915 _tmp_rho_value() {}
916916
917- template <typename Element, typename Traits>
918- void Konieczny<Element, Traits>::DClass::init(DClass const & that) {
919- _class_computed = that._class_computed ;
920- _H_class_computed = that._H_class_computed ;
921- _is_regular_D_class = that._is_regular_D_class ;
922- _left_indices = that._left_indices ;
923- _mults_computed = that._mults_computed ;
924- _parent = that._parent ;
925- _rank = that._rank ;
926-
927- this ->internal_free (_rep);
928- _rep = that._parent ->internal_copy (that._rep );
929- _reps_computed = that._reps_computed ;
930- _right_indices = that._right_indices ;
931-
932- InternalVecCopy ()(that._H_class , _H_class);
933- InternalVecCopy ()(that._left_mults , _left_mults);
934- InternalVecCopy ()(that._left_mults_inv , _left_mults_inv);
935- InternalVecCopy ()(that._left_reps , _left_reps);
936- InternalVecCopy ()(that._right_mults , _right_mults);
937- InternalVecCopy ()(that._right_mults_inv , _right_mults_inv);
938- InternalVecCopy ()(that._right_reps , _right_reps);
939- }
940-
941917 template <typename Element, typename Traits>
942918 void Konieczny<Element, Traits>::DClass::clear() {}
943919
@@ -961,13 +937,32 @@ namespace libsemigroups {
961937
962938 template <typename Element, typename Traits>
963939 Konieczny<Element, Traits>::DClass::DClass(DClass const & that) : DClass() {
964- init ( that) ;
940+ * this = that;
965941 }
966942
967943 template <typename Element, typename Traits>
968944 typename Konieczny<Element, Traits>::DClass&
969945 Konieczny<Element, Traits>::DClass::operator =(DClass const & that) {
970- init (that);
946+ _class_computed = that._class_computed ;
947+ _H_class_computed = that._H_class_computed ;
948+ _is_regular_D_class = that._is_regular_D_class ;
949+ _left_indices = that._left_indices ;
950+ _mults_computed = that._mults_computed ;
951+ _parent = that._parent ;
952+ _rank = that._rank ;
953+
954+ this ->internal_free (_rep);
955+ _rep = that._parent ->internal_copy (that._rep );
956+ _reps_computed = that._reps_computed ;
957+ _right_indices = that._right_indices ;
958+
959+ InternalVecCopy ()(that._H_class , _H_class);
960+ InternalVecCopy ()(that._left_mults , _left_mults);
961+ InternalVecCopy ()(that._left_mults_inv , _left_mults_inv);
962+ InternalVecCopy ()(that._left_reps , _left_reps);
963+ InternalVecCopy ()(that._right_mults , _right_mults);
964+ InternalVecCopy ()(that._right_mults_inv , _right_mults_inv);
965+ InternalVecCopy ()(that._right_reps , _right_reps);
971966 return *this ;
972967 }
973968
@@ -1395,8 +1390,12 @@ namespace libsemigroups {
13951390#endif
13961391 }
13971392
1398- void init (RegularDClass const & that) {
1399- Konieczny<Element, Traits>::DClass::init (that);
1393+ RegularDClass (RegularDClass const & that) : RegularDClass() {
1394+ *this = that;
1395+ }
1396+
1397+ RegularDClass& operator =(RegularDClass const & that) {
1398+ Konieczny<Element, Traits>::DClass::operator =(that);
14001399
14011400 _H_gens_computed = that._H_gens_computed ;
14021401 _idem_reps_computed = that._idem_reps_computed ;
@@ -1407,20 +1406,12 @@ namespace libsemigroups {
14071406 _rho_index_positions = that._rho_index_positions ;
14081407 InternalVecCopy ()(that._left_idem_reps , _left_idem_reps);
14091408 InternalVecCopy ()(that._right_idem_reps , _right_idem_reps);
1410- }
1411-
1412- RegularDClass (RegularDClass const & that) : RegularDClass() {
1413- init (that);
1414- }
14151409
1416- RegularDClass& operator =(RegularDClass const & that) {
1417- init (that);
14181410 return *this ;
14191411 }
14201412
1421- RegularDClass (RegularDClass&&) = default ;
1422-
1423- RegularDClass& operator =(RegularDClass&&) = default ;
1413+ RegularDClass (RegularDClass&&) = delete ;
1414+ RegularDClass& operator =(RegularDClass&&) = delete ;
14241415
14251416 public:
14261417 // //////////////////////////////////////////////////////////////////////
@@ -2013,8 +2004,8 @@ namespace libsemigroups {
20132004 compute_frame ();
20142005 }
20152006
2016- void init (NonRegularDClass const & that) {
2017- Konieczny<Element, Traits>::DClass::init (that);
2007+ NonRegularDClass& operator = (NonRegularDClass const & that) {
2008+ Konieczny<Element, Traits>::DClass::operator = (that);
20182009
20192010 _idems_above_computed = that._idems_above_computed ;
20202011 _lambda_index_positions = that._lambda_index_positions ;
@@ -2040,20 +2031,16 @@ namespace libsemigroups {
20402031 // set_left_idem_class and set_right_idem_class
20412032 _left_idem_class = that._left_idem_class ;
20422033 _right_idem_class = that._right_idem_class ;
2043- }
2044-
2045- NonRegularDClass (NonRegularDClass const & that) : NonRegularDClass() {
2046- init (that);
2047- }
20482034
2049- NonRegularDClass& operator =(NonRegularDClass const & that) {
2050- init (that);
20512035 return *this ;
20522036 }
20532037
2054- NonRegularDClass (NonRegularDClass&&) = default ;
2038+ NonRegularDClass (NonRegularDClass const & that) : NonRegularDClass() {
2039+ *this = that;
2040+ }
20552041
2056- NonRegularDClass& operator =(NonRegularDClass&&) = default ;
2042+ NonRegularDClass (NonRegularDClass&&) = delete ;
2043+ NonRegularDClass& operator =(NonRegularDClass&&) = delete ;
20572044
20582045 public:
20592046 // //////////////////////////////////////////////////////////////////////
0 commit comments