Fix unchecked type caster template Dim type

This commit is contained in:
Jason Rhinelander 2017-03-26 12:43:22 -03:00
parent 5b50376490
commit d6fdafb203

View File

@ -340,11 +340,11 @@ public:
template <typename... Ix> T *mutable_data(Ix... ix) { return &operator()(size_t(ix)...); }
};
template <typename T, size_t Dim>
template <typename T, ssize_t Dim>
struct type_caster<unchecked_reference<T, Dim>> {
static_assert(Dim == 0 && Dim > 0 /* always fail */, "unchecked array proxy object is not castable");
};
template <typename T, size_t Dim>
template <typename T, ssize_t Dim>
struct type_caster<unchecked_mutable_reference<T, Dim>> : type_caster<unchecked_reference<T, Dim>> {};
NAMESPACE_END(detail)