File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -197,11 +197,11 @@ template <typename type> class type_caster : public type_caster_custom {
197197 }
198198
199199 operator type*() { return (type *) value; }
200- operator type&() { return ( type &) * value; }
200+ operator type&() { return *(( type *) value) ; }
201201protected:
202202 template <typename T = type, typename std::enable_if<std::is_copy_constructible<T>::value, int >::type = 0 >
203203 static void *copy_constructor (const void *arg) {
204- return new type (( const type &)* arg);
204+ return new type (*(( const type *) arg) );
205205 }
206206 template <typename T = type, typename std::enable_if<!std::is_copy_constructible<T>::value, int >::type = 0 >
207207 static void *copy_constructor (const void *) { return nullptr ; }
You can’t perform that action at this time.
0 commit comments