LJA icon indicating copy to clipboard operation
LJA copied to clipboard

Serialize header potentially missing include <optional>

Open ASLeonard opened this issue 2 years ago • 2 comments

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.

ASLeonard avatar Mar 01 '22 11:03 ASLeonard

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

AntonBankevich avatar Mar 02 '22 16:03 AntonBankevich

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.

ASLeonard avatar Mar 03 '22 07:03 ASLeonard