message: fix a bug exposed by gcc 6.3
Do not return a reference from type_id_single. This causes
odr use of tuple_type_id which results in link failures.
Change-Id: I67fbefe7dca21666b551199dc62f4348aa8dc12d
Tested: Successfully built an application under gcc 6.3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/sdbusplus/message/types.hpp b/sdbusplus/message/types.hpp
index 8dccbef..6a30dd6 100644
--- a/sdbusplus/message/types.hpp
+++ b/sdbusplus/message/types.hpp
@@ -108,7 +108,7 @@
*
* @tparam T - The type to get the dbus type character(s) for.
*/
-template <typename T> constexpr auto& type_id_single();
+template <typename T> constexpr auto type_id_single();
/** @fn type_id_multiple()
* @brief Get a tuple containing the dbus type characters for a sequence of
@@ -212,7 +212,7 @@
{
};
-template <typename T> constexpr auto& type_id_single()
+template <typename T> constexpr auto type_id_single()
{
static_assert(!std::is_base_of<undefined_type_id, type_id<T>>::value,
"No dbus type conversion provided for type.");