draconisplusplus/include/rfl/internal/wrap_in_rfl_array_t.hpp

29 lines
529 B
C++
Raw Normal View History

2024-05-31 22:59:00 -04:00
#ifndef RFL_INTERNAL_WRAP_IN_RFL_ARRAY_T_
#define RFL_INTERNAL_WRAP_IN_RFL_ARRAY_T_
#include <type_traits>
#include "Array.hpp"
namespace rfl {
2024-06-08 14:10:59 -04:00
namespace internal {
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
struct wrap_in_rfl_array {
using type = T;
};
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
requires std::is_array_v<T>
struct wrap_in_rfl_array<T> {
using type = Array<T>;
};
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
using wrap_in_rfl_array_t = typename wrap_in_rfl_array<T>::type;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
} // namespace internal
} // namespace rfl
2024-05-31 22:59:00 -04:00
#endif