mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-12 11:47:50 +00:00
Fix unchecked type caster template Dim type
This commit is contained in:
parent
5b50376490
commit
d6fdafb203
@ -340,11 +340,11 @@ public:
|
|||||||
template <typename... Ix> T *mutable_data(Ix... ix) { return &operator()(size_t(ix)...); }
|
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>> {
|
struct type_caster<unchecked_reference<T, Dim>> {
|
||||||
static_assert(Dim == 0 && Dim > 0 /* always fail */, "unchecked array proxy object is not castable");
|
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>> {};
|
struct type_caster<unchecked_mutable_reference<T, Dim>> : type_caster<unchecked_reference<T, Dim>> {};
|
||||||
|
|
||||||
NAMESPACE_END(detail)
|
NAMESPACE_END(detail)
|
||||||
|
Loading…
Reference in New Issue
Block a user