sparse_slice update

* C++
- updated sparse_slice for some compatibility with arithmetics
  operators.
- updated test file.