Skip to content

Commit

Permalink
Remove const_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
vinipsmaker committed Jul 26, 2021
1 parent 1b4d392 commit 21ea754
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions include/trial/protocol/json/serialization/boost/hana.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,17 @@ struct load_overloader<json::basic_iarchive<CharT>,
}

// skip key
//json::partial::skip(ar.reader());
json::partial::skip(const_cast<json::reader&>(ar.reader()));
{
auto r = ar.reader();
json::partial::skip(r);
ar.reader(std::move(r));
}
// skip value
//json::partial::skip(ar.reader());
json::partial::skip(const_cast<json::reader&>(ar.reader()));
{
auto r = ar.reader();
json::partial::skip(r);
ar.reader(std::move(r));
}

// TODO: actually decode stuff
//ar >> x;
Expand Down

0 comments on commit 21ea754

Please sign in to comment.