mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-02 13:15:52 +08:00
fix build on linux
This commit is contained in:
parent
436b731891
commit
ad7bc01d51
@ -197,11 +197,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
operator type*() { return (type *) value; }
|
operator type*() { return (type *) value; }
|
||||||
operator type&() { return (type &) *value; }
|
operator type&() { return *((type *) value); }
|
||||||
protected:
|
protected:
|
||||||
template <typename T = type, typename std::enable_if<std::is_copy_constructible<T>::value, int>::type = 0>
|
template <typename T = type, typename std::enable_if<std::is_copy_constructible<T>::value, int>::type = 0>
|
||||||
static void *copy_constructor(const void *arg) {
|
static void *copy_constructor(const void *arg) {
|
||||||
return new type((const type &)*arg);
|
return new type(*((const type *)arg));
|
||||||
}
|
}
|
||||||
template <typename T = type, typename std::enable_if<!std::is_copy_constructible<T>::value, int>::type = 0>
|
template <typename T = type, typename std::enable_if<!std::is_copy_constructible<T>::value, int>::type = 0>
|
||||||
static void *copy_constructor(const void *) { return nullptr; }
|
static void *copy_constructor(const void *) { return nullptr; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user