Commit 2487c5d2 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added explicitly defaulted copy and move constructors and assignment operators to DistributedVector

parent 61322f2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public:

   DistributedArray() = default;

   DistributedArray( DistributedArray& ) = default;
   DistributedArray( const DistributedArray& ) = default;

   DistributedArray( LocalRangeType localRange, Index globalSize, CommunicationGroup group = Communicator::AllGroup );

+20 −0
Original line number Diff line number Diff line
@@ -51,6 +51,26 @@ public:
   using BaseType::DistributedArray;
   using BaseType::operator=;

   /**
    * \brief Copy constructor (makes a deep copy).
    */
   explicit DistributedVector( const DistributedVector& ) = default;

   /**
    * \brief Default move constructor.
    */
   DistributedVector( DistributedVector&& ) = default;

   /**
    * \brief Copy-assignment operator for copying data from another vector.
    */
   DistributedVector& operator=( const DistributedVector& ) = default;

   /**
    * \brief Move-assignment operator for acquiring data from \e rvalues.
    */
   DistributedVector& operator=( DistributedVector&& ) = default;

   // we return only the view so that the user cannot resize it
   LocalViewType getLocalView();