iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
helper.hpp
Go to the documentation of this file.
1
// Copyright (c) 2025 Contributors to the Eclipse Foundation
2
//
3
// See the NOTICE file(s) distributed with this work for additional
4
// information regarding copyright ownership.
5
//
6
// This program and the accompanying materials are made available under the
7
// terms of the Apache Software License 2.0 which is available at
8
// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
9
// which is available at https://opensource.org/licenses/MIT.
10
//
11
// SPDX-License-Identifier: Apache-2.0 OR MIT
12
13
#ifndef IOX2_SERVICE_INTERNAL_HELPER_HPP
14
#define IOX2_SERVICE_INTERNAL_HELPER_HPP
15
16
namespace
iox2
{
17
namespace
internal {
18
19
template
<
typename
T>
20
struct
PlacementDefault
{
21
template
<
typename
S>
22
static
void
placement_default
(S& payload) {
23
new
(&payload.user_header_mut()) T();
24
}
25
};
26
27
template
<>
28
struct
PlacementDefault
<void> {
29
template
<
typename
S>
30
static
void
placement_default
(S& payload) {
31
static_cast<
void
>
(payload);
32
}
33
};
34
35
}
// namespace internal
36
}
// namespace iox2
37
38
#endif
iox2
Definition
active_request.hpp:26
iox2::internal::PlacementDefault< void >::placement_default
static void placement_default(S &payload)
Definition
helper.hpp:30
iox2::internal::PlacementDefault
Definition
helper.hpp:20
iox2::internal::PlacementDefault::placement_default
static void placement_default(S &payload)
Definition
helper.hpp:22
iox2
internal
helper.hpp
Generated by
1.9.8