Skip to content

Instantly share code, notes, and snippets.

@minorsecond
Created June 13, 2015 20:24
Show Gist options
  • Save minorsecond/897e5071f7bab45d27d5 to your computer and use it in GitHub Desktop.
Save minorsecond/897e5071f7bab45d27d5 to your computer and use it in GitHub Desktop.
This code produces: "'jobs::abbrev' cannot appear in a constant-expression" and "note: in expansion of macro 'HIBERLITE_NVP'"
class jobs
// Jobs table in timesheet.db
{
friend class hiberlite::access;
template<class Archive>
void hibernate(Archive & ar)
{
ar & HIBERLITE_NVP(id);
ar & HIBERLITE_NVP(uuid);
ar & HIBERLITE_NVP(name);
ar & HIBERLITE_NVP(abbrev);
ar & HIBERLITE_NVP(pay);
ar & HIBERLITE_NVP(worked);
}
public:
int id;
char uuid;
char name;
char abbrev;
float pay;
time_t worked;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment