mayah / tinytoml

A header only C++11 library for parsing TOML
BSD 2-Clause "Simplified" License
167 stars 31 forks source link

support compilation with exception disabled #33

Closed hongxuchen closed 6 years ago

hongxuchen commented 6 years ago

Given failwith is the only function incompatible when -fno-exceptions is specified, I think it would be great to provide a version where exceptions are disabled. The compilation condition can be guarded by a macro guard.

mayah commented 6 years ago

To achieve that,

Actually I'm also considering an exception is harmful, but I'm not sure it's a good decision for now.

hongxuchen commented 6 years ago

Personally I prefer the immediate abortion since for now it introduces the minimal changes.

mayah commented 6 years ago

Now you can define your own failwith.