diff --git a/libs/full/async_colocated/CMakeLists.txt b/libs/full/async_colocated/CMakeLists.txt index 1cb331e08704..ed0eef96558a 100644 --- a/libs/full/async_colocated/CMakeLists.txt +++ b/libs/full/async_colocated/CMakeLists.txt @@ -58,6 +58,6 @@ add_hpx_module( COMPAT_HEADERS ${async_colocated_compat_headers} DEPENDENCIES hpx_core MODULE_DEPENDENCIES hpx_actions_base hpx_agas_base hpx_async_distributed - hpx_components_base hpx_naming_base + hpx_components hpx_components_base hpx_naming_base CMAKE_SUBDIRS examples tests ) diff --git a/libs/full/async_colocated/src/get_colocation_id.cpp b/libs/full/async_colocated/src/get_colocation_id.cpp index 272ab0ee73ea..9b3241984ecf 100644 --- a/libs/full/async_colocated/src/get_colocation_id.cpp +++ b/libs/full/async_colocated/src/get_colocation_id.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/libs/full/naming_base/include/hpx/naming_base/id_type.hpp b/libs/full/naming_base/include/hpx/naming_base/id_type.hpp index 9bbbb02966fa..e049217c6760 100644 --- a/libs/full/naming_base/include/hpx/naming_base/id_type.hpp +++ b/libs/full/naming_base/include/hpx/naming_base/id_type.hpp @@ -148,6 +148,14 @@ namespace hpx { /////////////////////////////////////////////////////////////////////////// HPX_CXX_EXPORT inline id_type const invalid_id = id_type(); + namespace lcos::detail { + + // The definition lives in the components module. Declare it before + // future can instantiate the primary shared-state template. + template <> + struct HPX_EXPORT future_data; + } // namespace lcos::detail + namespace naming { /////////////////////////////////////////////////////////////////////////// diff --git a/libs/full/runtime_components/tests/unit/agas/get_colocation_id.cpp b/libs/full/runtime_components/tests/unit/agas/get_colocation_id.cpp index a58e3631335e..8a63863d6eff 100644 --- a/libs/full/runtime_components/tests/unit/agas/get_colocation_id.cpp +++ b/libs/full/runtime_components/tests/unit/agas/get_colocation_id.cpp @@ -1,4 +1,5 @@ // Copyright (c) 2007-2014 Hartmut Kaiser +// Copyright (c) 2026 Divyanshi Talreja // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -70,6 +71,7 @@ void test(hpx::id_type there) // verify for remote component HPX_TEST_EQ(hpx::get_colocation_id(hpx::launch::sync, t1.get_id()), there); + HPX_TEST_EQ(hpx::get_colocation_id(t1.get_id()).get(), there); HPX_TEST_EQ( hpx::async(hpx::colocated(t1.get_id())).get(), @@ -80,6 +82,7 @@ void test(hpx::id_type there) // verify for remote locality HPX_TEST_EQ(hpx::get_colocation_id(hpx::launch::sync, there), there); + HPX_TEST_EQ(hpx::get_colocation_id(there).get(), there); HPX_TEST_EQ( hpx::async(hpx::colocated(there)).get(), there);