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:
Darred
2021-12-17 15:47:56 +02:00
committed by Shane Grant
parent 408a351ce0
commit de953044b0

View File

@@ -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 );