pop a object using move constractor