Add array_to_ptr template

C++ template to convert T[] type to T* type.

Change-Id: I91c63b5d14b77f82d3deea3772990912dfcd4277
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/utility/type_traits.cpp b/test/utility/type_traits.cpp
new file mode 100644
index 0000000..3a31d06
--- /dev/null
+++ b/test/utility/type_traits.cpp
@@ -0,0 +1,24 @@
+#include <sdbusplus/utility/type_traits.hpp>
+
+int main()
+{
+    using sdbusplus::utility::array_to_ptr_t;
+
+    static_assert(
+        std::is_same<char, array_to_ptr_t<char, char>>::value,
+        "array_to_ptr_t<char, char> != char");
+
+    static_assert(
+        std::is_same<char*, array_to_ptr_t<char, char*>>::value,
+        "array_to_ptr_t<char, char*> != char*");
+
+    static_assert(
+        std::is_same<char*, array_to_ptr_t<char, char[100]>>::value,
+        "array_to_ptr_t<char, char[100]> != char*");
+
+    static_assert(
+        std::is_same<char[100], array_to_ptr_t<int, char[100]>>::value,
+        "array_to_ptr_t<int, char[100]> != char[100]");
+
+    return 0;
+}