blob: 9d67ae3505ecfbe946dd2fae159113c4fafa7258 [file] [log] [blame]
Patrick Williamsbbd00232016-11-16 16:06:28 -06001#pragma once
2
3#include <utility>
4
5namespace sdbusplus
6{
7namespace server
8{
9namespace binding
10{
11namespace details
12{
13
14/** Utility for converting C++ types prior to 'append'ing to a message.
15 *
16 * Some C++ types require conversion to a native dbus type before they
17 * can be inserted into a message. This template provides a general no-op
18 * implementation for all other types.
19 */
Andrew Geissler072da3e2018-01-18 07:21:42 -080020template <typename T> T&& convertForMessage(T&& t)
Patrick Williamsbbd00232016-11-16 16:06:28 -060021{
22 return std::forward<T>(t);
23}
Patrick Williamsbbd00232016-11-16 16:06:28 -060024}
25}
26}
27}