Simplify mangled names for type_id_downcast_t.
Since type_id_downcast_t was a type-alias, the full template set
was placed into the mangled name for any function using it.
Create a type_id_downcast structure to simplify the name mangling.
This reduces a managled name like:
enable_if<is_same<array_to_ptr_t<char, remove_cv< remove_reference<
char[10]>>>, char*>
To:
enable_if<is_same<type_id_downcast<char[10]>, char*>>
Change-Id: Idd169ce51082420fb4b6df40a8cd0bc5d874acd4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sdbusplus/message/types.hpp b/sdbusplus/message/types.hpp
index 6207a56..cd0fff2 100644
--- a/sdbusplus/message/types.hpp
+++ b/sdbusplus/message/types.hpp
@@ -134,12 +134,14 @@
* 2. Remove 'const' and 'vector'.
* 3. Convert 'char[N]' to 'char*'.
*/
+template <typename T> struct type_id_downcast
+{
+ using type = typename utility::array_to_ptr_t<
+ char, std::remove_cv_t<std::remove_reference_t<T>>>;
+};
+
template <typename T> using type_id_downcast_t =
- utility::array_to_ptr_t<char,
- std::remove_cv_t<
- std::remove_reference_t<T>
- >
- >;
+ typename type_id_downcast<T>::type;
} // namespace details