Patrick Williams | bbd0023 | 2016-11-16 16:06:28 -0600 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <utility> |
| 4 | |
| 5 | namespace sdbusplus |
| 6 | { |
| 7 | namespace server |
| 8 | { |
| 9 | namespace binding |
| 10 | { |
| 11 | namespace 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 Geissler | 072da3e | 2018-01-18 07:21:42 -0800 | [diff] [blame^] | 20 | template <typename T> T&& convertForMessage(T&& t) |
Patrick Williams | bbd0023 | 2016-11-16 16:06:28 -0600 | [diff] [blame] | 21 | { |
| 22 | return std::forward<T>(t); |
| 23 | } |
Patrick Williams | bbd0023 | 2016-11-16 16:06:28 -0600 | [diff] [blame] | 24 | } |
| 25 | } |
| 26 | } |
| 27 | } |