I use the boost::serialization library. When compiling i get a lot of lengthy warnings which seem to be related to not using file_version in the serialize function. (compiler: g++)
Is there a smart way to disable those warnings for those functions explicitly, as i like unused variable warnings in general which help avoiding stupid mistakes.
code example (very much not self contained, but should suffice to make a point):
template<class Archive>
void serialize(Archive &ar, const unsigned int file_version)
{
ar & this->bias_;
for(auto& layer : this->layers_)
ar & layer; // old boost version doesn't do this for containers.
}
my idea of just writing
template<class Archive>
void serialize(Archive &ar, const unsigned int file_version)
{
file_version;
ar & this->bias_;
for(auto& layer : this->layers_)
ar & layer;
}
rightfully brings up another warning.