Motorcortex Core  version: 2.7.6
visit_helper.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2016 VECTIONEER.
4  */
5 
6 #ifndef MOTORCORTEX_CORE_VISIT_HELPER_H
7 #define MOTORCORTEX_CORE_VISIT_HELPER_H
8 
9 #include <array>
10 #include <type_traits>
11 
12 namespace visit_struct {
13 
14 namespace helper {
15 
16 template <class T>
17 struct is_array : std::is_array<T> {};
18 
19 template <class T, std::size_t N>
20 struct is_array<std::array<T, N>> : std::true_type {};
21 
22 // optional:
23 template <class T>
24 struct is_array<T const> : is_array<T> {};
25 
26 template <class T>
27 struct is_array<T volatile> : is_array<T> {};
28 
29 template <class T>
30 struct is_array<T volatile const> : is_array<T> {};
31 
32 } // namespace helper
33 
34 } // namespace visit_struct
35 
36 #endif // MOTORCORTEX_CORE_VISIT_HELPER_H
visit_struct::helper::is_array
Definition: visit_helper.h:17