Created
May 17, 2017 08:43
-
-
Save daniel-geon-park/20c8d10983e6c2cd731e686bbf35d6b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T, int first, int... dims> | |
struct arr_wrap { | |
static int sfinae[sizeof...(dims) > 0]; | |
using type = typename arr_wrap<typename arr_wrap<T, dims...>::type, first>::type; | |
}; | |
template<typename T, int n> | |
struct arr_wrap<T, n> { | |
using type = T[n]; | |
}; | |
template<typename T, int... dims> | |
using native_mat = typename arr_wrap<T, dims...>::type; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment