logoalt Hacker News

eltetolast Sunday at 6:54 PM2 repliesview on HN

If you compile with -fno-exceptions you just lost almost all of the STL.

You can compile with exceptions enabled, use the STL, but strictly enforce no allocations after initialization. It depends on how strict is the spec you are trying to hit.


Replies

vodoulast Sunday at 7:25 PM

Not my experience. I work with a -fno-exceptions codebase. Still quite a lot of std left. (Exceptions come with a surprisingly hefty binary size cost.)

show 2 replies
theICEBeardklast Sunday at 7:27 PM

Are you aware of the Freestanding definition of STL? See here: https://en.cppreference.com/w/cpp/freestanding.html Large and useful parts of it are available if you run with a newer c++ standard.

show 1 reply