Question on serialization boost tutorial

Hey everyone, just a quick question. I'm learning boost serialization (and also improving my c++ skills) and wanted to know why in the boost tutorial:

#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

class gps_position
{
public:
int degrees;
int minutes;
float seconds;
gps_position(){};
gps_position(int d, int m, float s) :
degrees(d), minutes(m), seconds(s)
{}
};


why is gps_position(){}; defined beforehand? Why not just delete that line?

Tutorial: https://www.boost.org/doc/libs/1_72_0/libs/serialization/doc/index.html
Under Nonintrusive Version
I'm guessing Boost.Serialization needs a default constructor to do its thing.
Topic archived. No new replies allowed.