Patrick Williams | 0c841a1 | 2016-07-20 12:34:24 -0500 | [diff] [blame] | 1 | #include <sdbusplus/utility/type_traits.hpp> |
| 2 | |
| 3 | int main() |
| 4 | { |
| 5 | using sdbusplus::utility::array_to_ptr_t; |
| 6 | |
| 7 | static_assert( |
| 8 | std::is_same<char, array_to_ptr_t<char, char>>::value, |
| 9 | "array_to_ptr_t<char, char> != char"); |
| 10 | |
| 11 | static_assert( |
| 12 | std::is_same<char*, array_to_ptr_t<char, char*>>::value, |
| 13 | "array_to_ptr_t<char, char*> != char*"); |
| 14 | |
| 15 | static_assert( |
| 16 | std::is_same<char*, array_to_ptr_t<char, char[100]>>::value, |
| 17 | "array_to_ptr_t<char, char[100]> != char*"); |
| 18 | |
| 19 | static_assert( |
| 20 | std::is_same<char[100], array_to_ptr_t<int, char[100]>>::value, |
| 21 | "array_to_ptr_t<int, char[100]> != char[100]"); |
| 22 | |
| 23 | return 0; |
| 24 | } |