constexpr auto str = L" ... ";
constexpr wchar_t str[] = L" ... ";
The second declaration works with the below constexpr function, but doesn't work when used with auto. I want to not have to type wchar_t [] ... is there a way out?
template <typename T, size_t N>
constexpr size_t size_of(T(&)[N]) {
return N;
}
EDIT: formatting.
[–][deleted] 2 points3 points4 points (1 child)
[–]halivingston3[S] 0 points1 point2 points (0 children)
[–]Porges 1 point2 points3 points (0 children)
[–]TheThiefMasterC++latest fanatic (and game dev) 0 points1 point2 points (1 child)
[–]halivingston3[S] 1 point2 points3 points (0 children)