I can't get the type of an element. This solution returns a reference to element type.
int arr[] = { 0, 1, 2, 3, 4, 5 };
using arrElemType = decltype(*arr);
vector<arrElemType> vec(std::cbegin(arr), std::cend(arr));
Try the following
using arrElemType = std::remove_reference<decltype( *arr )>::type;
or
typedef std::remove_reference<decltype( *arr )>::type arrElemType;
You need to include header <type_traits>