Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename A, typename B, typename enable_if<is_pointer<B>::value>::type* = nullptr>
- void move(A &new_ob, B source){
- if(is_convertible<typeof(*source), A>::value)
- new_ob = (A)*source;
- }
- template<typename A, typename B, typename enable_if<!is_pointer<B>::value>::type* = nullptr>
- void move(A &new_ob, B source){
- if(is_convertible<typeof(source), A>::value)
- new_ob = (A)source;
- }
Advertisement
Add Comment
Please, Sign In to add comment