jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
5.09k stars 1.83k forks source link

Cannot compile with exceptions disabled #1147

Open fansehep opened 1 year ago

fansehep commented 1 year ago

Hi guys. I can not compile the latest version of yaml-cpp with -fno-exception in latest gcc and clang. Should fix it? 2022-10-28_13-10-1666936765

OndrejPopp commented 1 year ago

Me neither.

The question is whether enabling exceptions just for this library gives a performance penalty... I had a look at the code, and there are just a few instances where exceptions are being thown, and only to signal that a node is not valid. So that could be disabled and then this library will compile just fine with exceptions disabled.

Ok, found it, This has already been taken of in the following unmerged pull request, https://github.com/jbeder/yaml-cpp/pull/1146