Skip to content
Snippets Groups Projects

Removed warning about implicitly declared assingment operator.

Closed Markus Blatt requested to merge markus.blatt/dune-istl:issues-warn-explcit-assing into master
9 unresolved threads

Removes Warnings like this:

dune/istl/ilu.hh:49:16: warning: implicitly-declared ‘constexpr Dune::Imp::compressed_base_array_unmanaged<Dune::FieldMatrix<double, 1, 1>, long unsigned int>::RealIterator<Dune::FieldMatrix<double, 1, 1> >& Dune::Imp::compressed_base_array_unmanaged<Dune::FieldMatrix<double, 1, 1>, long unsigned int>::RealIterator<Dune::FieldMatrix<double, 1, 1> >::operator=(const Dune::Imp::compressed_base_array_unmanaged<Dune::FieldMatrix<double, 1, 1>, long unsigned int>::RealIterator<Dune::FieldMatrix<double, 1, 1> >&)’ is deprecated [-Wdeprecated-copy] 49 | for (ij=(*i).begin(); ij.index()<i.index(); ++ij) | ~~^~~~~~~~~~~~~

Some C++ expert should double check this. You cannot trust me here.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
99 99 //! constructor
100 RealIterator ()
101 : p(0), i(0)
102 {}
103
104 100 RealIterator (const B* _p, B* _i) : p(_p), i(_i)
105 101 { }
106 102
103 RealIterator () = default;
104
107 105 RealIterator(const RealIterator<ValueType>& it)
108 : p(it.p), i(it.i)
106 : p(it.p), i(it.i)
109 107 {}
110 108
109 void operator=(const RealIterator<ValueType>& it)
  • 351 //! constructor
    352 RealIterator ()
    353 : p(0), j(0), i(0)
    354 {}
    355
    356 351 //! constructor
    357 352 RealIterator (B* _p, size_type* _j, size_type _i)
    358 353 : p(_p), j(_j), i(_i)
    359 354 { }
    360 355
    356 RealIterator () = default;
    357
    361 358 /**
    362 359 * @brief Copy constructor from mutable iterator
    363 360 */
    361 // template<typename V,typename = std::enable_if_t<!std::is_same<V,T>::value,void>>
  • 356 351 //! constructor
    357 352 RealIterator (B* _p, size_type* _j, size_type _i)
    358 353 : p(_p), j(_j), i(_i)
    359 354 { }
    360 355
    356 RealIterator () = default;
    357
    361 358 /**
    362 359 * @brief Copy constructor from mutable iterator
    363 360 */
    361 // template<typename V,typename = std::enable_if_t<!std::is_same<V,T>::value,void>>
    364 362 RealIterator(const RealIterator<ValueType>& it)
    365 363 : p(it.p), j(it.j), i(it.i)
    366 364 {}
    367 365
    366 void operator=(const RealIterator<ValueType>& it)
  • 352 RealIterator ()
    353 : p(0), j(0), i(0)
    354 {}
    355
    356 351 //! constructor
    357 352 RealIterator (B* _p, size_type* _j, size_type _i)
    358 353 : p(_p), j(_j), i(_i)
    359 354 { }
    360 355
    356 RealIterator () = default;
    357
    361 358 /**
    362 359 * @brief Copy constructor from mutable iterator
    363 360 */
    361 // template<typename V,typename = std::enable_if_t<!std::is_same<V,T>::value,void>>
    364 362 RealIterator(const RealIterator<ValueType>& it)
  • 259 261 return p;
    260 262 }
    261 263
    264 base_array_unmanaged () = default;
  • 97 97 friend class RealIterator<ValueType>;
    98 98
    99 99 //! constructor
    100 RealIterator ()
    101 : p(0), i(0)
    102 {}
    103
    104 100 RealIterator (const B* _p, B* _i) : p(_p), i(_i)
    105 101 { }
    106 102
    103 RealIterator () = default;
    104
    107 105 RealIterator(const RealIterator<ValueType>& it)
  • 97 97 friend class RealIterator<ValueType>;
    98 98
    99 99 //! constructor
    100 RealIterator ()
    101 : p(0), i(0)
    102 {}
    103
    104 100 RealIterator (const B* _p, B* _i) : p(_p), i(_i)
    105 101 { }
    106 102
    103 RealIterator () = default;
    104
    107 105 RealIterator(const RealIterator<ValueType>& it)
    108 : p(it.p), i(it.i)
    106 : p(it.p), i(it.i)
    • These are all nice improvements. The improvements itself need some more cleanup. It cannot be merged in the current form. The RealIterator and base array implementations need a lot of cleanup and could be simplified significantly. I would suggest to not do this for 2.10. Maybe we can just fix the deprecation warning. Which compiler did you use? What are the compiler flags that you have passed?

    • Which target did you compile to see these warnings?

    • I am not sure which were seen by which target.

      Some were seen when compiling dune-istl itself (make all) with -Wall -Wextra. There are many more appearing if I use OPM. Maybe some of those can be seen with make build_tests

    • Ah, ok, we typically do not test with -Wextra. The regular tests with -Wall do not show any warnings or just a few that I started to list in the repositories already

    • 2.11 and later back-porting to 2.10.1 would be my preference.

    • Please register or sign in to reply
  • changed milestone to %DUNE 2.11.0

  • Simon Praetorius mentioned in merge request !584 (merged)

    mentioned in merge request !584 (merged)

  • Please register or sign in to reply
    Loading