AntonBankevich / LJA

Other
109 stars 16 forks source link

Serialize header potentially missing include <optional> #16

Open ASLeonard opened 2 years ago

ASLeonard commented 2 years ago

I was getting errors compiling the current commit using gcc 11.2 because of errors like

LJA/src/tools/graphlite/serialize.hpp:13:1: note: 'std::optional' is defined in header '<optional>'; did you forget to '#include <optional>'?
   12 | #include "graphlite.hpp"
  +++ |+#include <optional>
....
LJA/src/tools/graphlite/serialize.hpp:247:33: error: 'nullopt' is not a member of 'std'

After including the recommend #include <optional> , everything else compiled fine. Not sure if it is specific to my compiler environment, but in case anyone else has this issue this solves it.

AntonBankevich commented 2 years ago

Hi! Thank you for your interest in LJA. Could you also tell me what OS do yo have and the version of cmake?

ASLeonard commented 2 years ago

OS: CentOS Linux release 7.9.2009 kernel: 3.10.0-1160.45.1.el7.x86_64 cmake: cmake version 3.20.3

The gcc I'm using is installed via conda as our HPC only has older versions, so potentially some issue with something not being pulled in by default.