mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +00: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…
Reference in New Issue
Block a user