Commit ad7bc01d by Wenzel Jakob

fix build on linux

parent 436b7318
...@@ -197,11 +197,11 @@ public: ...@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment