Skip to content

Commit

Permalink
Merge pull request #6606 from STEllAR-GROUP/fixing_6605
Browse files Browse the repository at this point in the history
Making sure copy_component creates a new gid
  • Loading branch information
hkaiser authored Jan 23, 2025
2 parents 3a2b72a + 7dfb4fb commit 964ccb0
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2015 Thomas Heller
// Copyright (c) 2007-2024 Hartmut Kaiser
// Copyright (c) 2007-2025 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand Down Expand Up @@ -29,8 +29,13 @@ namespace hpx::components {
constexpr base_component() = default;
HPX_EXPORT ~base_component();

base_component(base_component const&) = default;
base_component& operator=(base_component const&) = default;
// do not copy the gid_
base_component(base_component const&) noexcept {}
base_component& operator=(base_component const&) noexcept
{
gid_ = naming::gid_type();
return *this;
}

// just move our gid_
base_component(base_component&& rhs) noexcept = default;
Expand Down

0 comments on commit 964ccb0

Please sign in to comment.