mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
Fixed loading of std::vector<bool>
We should use auto && instead of auto if we want to modify v inside the for loop.
This commit is contained in:
@@ -100,7 +100,7 @@ namespace cereal
|
||||
ar( make_size_tag( size ) );
|
||||
|
||||
vector.resize( static_cast<std::size_t>( size ) );
|
||||
for(auto v : vector)
|
||||
for(auto && v : vector)
|
||||
{
|
||||
bool b;
|
||||
ar( b );
|
||||
|
||||
Reference in New Issue
Block a user