• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #849

08 Dec 2022 10:31PM UTC coverage: 85.715% (-0.7%) from 86.456%
#849

push

StellarBot
Merge #6102

6102: Prevent warnings generated by clang-cl r=hkaiser a=hkaiser

clang-cl does not support `[[no_unique_address]]` nor does it support `[[msvc::no_unique_address]]`. This PR fixes the related warning generated by it.

Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

171602 of 200200 relevant lines covered (85.72%)

2048410.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.18
/libs/full/async_distributed/include/hpx/async_distributed/async_continue_callback.hpp
1
//  Copyright (c) 2007-2022 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
///////////////////////////////////////////////////////////////////////////////
8

9
#pragma once
10

11
#include <hpx/actions_base/traits/extract_action.hpp>
12
#include <hpx/actions_base/traits/is_distribution_policy.hpp>
13
#include <hpx/async_distributed/async_callback_fwd.hpp>
14
#include <hpx/async_distributed/async_continue.hpp>
15
#include <hpx/async_distributed/detail/post_callback.hpp>
16
#include <hpx/futures/traits/promise_local_result.hpp>
17
#include <hpx/futures/traits/promise_remote_result.hpp>
18

19
#include <type_traits>
20
#include <utility>
21

22
namespace hpx {
23
    ///////////////////////////////////////////////////////////////////////////
24
    namespace detail {
25
        template <typename Action, typename RemoteResult, typename Cont,
26
            typename Target, typename Callback, typename... Ts>
27
        hpx::future<typename traits::promise_local_result<
28
            typename result_of_async_continue<Action, Cont>::type>::type>
29
        async_continue_r_cb(
32✔
30
            Cont&& cont, Target const& target, Callback&& cb, Ts&&... vs)
31
        {
32
            typedef typename traits::promise_local_result<
33
                typename result_of_async_continue<Action, Cont>::type>::type
34
                result_type;
35

36
            typedef
37
                typename hpx::traits::extract_action<Action>::remote_result_type
38
                    continuation_result_type;
39

40
            hpx::distributed::promise<result_type, RemoteResult> p;
32✔
41
            auto f = p.get_future();
32✔
42

43
            hpx::post_cb<Action>(hpx::actions::typed_continuation<result_type,
32✔
44
                                     continuation_result_type>(
45
                                     p.get_id(), HPX_FORWARD(Cont, cont)),
32✔
46
                target, HPX_FORWARD(Callback, cb), HPX_FORWARD(Ts, vs)...);
32✔
47

48
            return f;
32✔
49
        }
32✔
50
    }    // namespace detail
51

52
    ///////////////////////////////////////////////////////////////////////////
53
    template <typename Action, typename Cont, typename Callback, typename... Ts>
54
    hpx::future<typename traits::promise_local_result<
55
        typename detail::result_of_async_continue<Action, Cont>::type>::type>
56
    async_continue_cb(
16✔
57
        Cont&& cont, hpx::id_type const& gid, Callback&& cb, Ts&&... vs)
58
    {
59
        typedef typename traits::promise_remote_result<
60
            typename detail::result_of_async_continue<Action, Cont>::type>::type
61
            result_type;
62

63
        return detail::async_continue_r_cb<Action, result_type>(
16✔
64
            HPX_FORWARD(Cont, cont), gid, HPX_FORWARD(Callback, cb),
16✔
65
            HPX_FORWARD(Ts, vs)...);
16✔
66
    }
67

68
    template <typename Component, typename Signature, typename Derived,
69
        typename Cont, typename Callback, typename... Ts>
70
    hpx::future<typename traits::promise_local_result<
71
        typename detail::result_of_async_continue<Derived, Cont>::type>::type>
72
    async_continue_cb(
16✔
73
        hpx::actions::basic_action<Component, Signature, Derived> /*act*/,
74
        Cont&& cont, hpx::id_type const& gid, Callback&& cb, Ts&&... vs)
75
    {
76
        return async_continue_cb<Derived>(HPX_FORWARD(Cont, cont), gid,
32✔
77
            HPX_FORWARD(Callback, cb), HPX_FORWARD(Ts, vs)...);
16✔
78
    }
79

80
    ///////////////////////////////////////////////////////////////////////////
81
    template <typename Action, typename Cont, typename DistPolicy,
82
        typename Callback, typename... Ts>
83
    typename std::enable_if<traits::is_distribution_policy<DistPolicy>::value,
84
        hpx::future<typename traits::promise_local_result<typename detail::
85
                result_of_async_continue<Action, Cont>::type>::type>>::type
86
    async_continue_cb(
×
87
        Cont&& cont, DistPolicy const& policy, Callback&& cb, Ts&&... vs)
88
    {
89
        typedef typename traits::promise_remote_result<
90
            typename detail::result_of_async_continue<Action, Cont>::type>::type
91
            result_type;
92

93
        return detail::async_continue_r_cb<Action, result_type>(
×
94
            HPX_FORWARD(Cont, cont), policy, HPX_FORWARD(Callback, cb),
×
95
            HPX_FORWARD(Ts, vs)...);
×
96
    }
97

98
    template <typename Component, typename Signature, typename Derived,
99
        typename Cont, typename DistPolicy, typename Callback, typename... Ts>
100
    typename std::enable_if<traits::is_distribution_policy<DistPolicy>::value,
101
        hpx::future<typename traits::promise_local_result<typename detail::
102
                result_of_async_continue<Derived, Cont>::type>::type>>::type
103
    async_continue_cb(
×
104
        hpx::actions::basic_action<Component, Signature, Derived> /*act*/,
105
        Cont&& cont, DistPolicy const& policy, Callback&& cb, Ts&&... vs)
106
    {
107
        return async_continue_cb<Derived>(HPX_FORWARD(Cont, cont), policy,
×
108
            HPX_FORWARD(Callback, cb), HPX_FORWARD(Ts, vs)...);
×
109
    }
110
}    // namespace hpx
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc