File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,12 @@ template <typename T> struct same_size {
113
113
template <typename U> using as = bool_constant<sizeof (T) == sizeof (U)>;
114
114
};
115
115
116
+ template <typename Concrete> constexpr int platform_lookup () { return -1 ; }
117
+
116
118
// Lookup a type according to its size, and return a value corresponding to the NumPy typenum.
117
- template <typename Concrete, typename ... Check, typename ... Int>
118
- constexpr int platform_lookup (Int... codes) {
119
- using code_index = std::integral_constant<int , constexpr_first<same_size<Concrete>::template as, Check...>()>;
120
- static_assert (code_index::value != sizeof ...(Check), " Unable to match type on this platform" );
121
- return std::get<code_index::value>(std::make_tuple (codes...));
119
+ template <typename Concrete, typename T, typename ... Ts, typename ... Ints>
120
+ constexpr int platform_lookup (int I, Ints... Is) {
121
+ return sizeof (Concrete) == sizeof (T) ? I : platform_lookup<Concrete, Ts...>(Is...);
122
122
}
123
123
124
124
struct npy_api {
You can’t perform that action at this time.
0 commit comments