R3BRootGroup / R3BRoot

Framework for Simulations and Data Analysis of R3B Experiment
https://github.com/R3BRootGroup/R3BRoot/wiki
GNU General Public License v3.0
18 stars 104 forks source link

fix R3BRoot/r3bbase/R3BFileSource2.h:29:48: error: no template named … #939

Closed audreychatillon closed 10 months ago

audreychatillon commented 10 months ago

…'optional' in namespace 'std'

fix error: invalid use of incomplete type ‘class std::basic_ostream

Describe your proposal.

Mention any issue this PR is resolved or is related to.


Checklist:

YanzhaoW commented 10 months ago

Thanks a lot for the PR. This problem comes from my PR #910 and I had no idea why it compiled successfully both in the CI and lxir136 machine.

But I did see it when I tried to compile R3BRoot using gcc12.

Which gcc version do you use when you found this issue?

Also please create another PR based on dev branch and as it's a small change, we could merge it quickly as well. @jose-luis-rs

audreychatillon commented 10 months ago

gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

YanzhaoW commented 10 months ago

Yeah, that makes sense. In our CI, gcc version is 8.3.0 and probably gcc 8 includes some headers by default and somehow they are not included anymore in newer versions.