fix build on linux

This commit is contained in:
Wenzel Jakob 2015-10-20 01:09:53 +02:00
parent 436b731891
commit ad7bc01d51

View File

@ -197,11 +197,11 @@ public:
}
operator type*() { return (type *) value; }
operator type&() { return (type &) *value; }
operator type&() { return *((type *) value); }
protected:
template <typename T = type, typename std::enable_if<std::is_copy_constructible<T>::value, int>::type = 0>
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>
static void *copy_constructor(const void *) { return nullptr; }