serge-sans-paille / frozen

a header-only, constexpr alternative to gperf for C++14 users
Apache License 2.0
1.32k stars 104 forks source link

exception free version of frozen for embedded environment ? #79

Closed alex31 closed 5 years ago

alex31 commented 5 years ago

Hello, I find frozen to be a really good idea for small microcontroler application, but it does not compile when we disable exceptions, that is usually the case when compiling for small embedded platform.

Is it possible to make exception usage an option ?

serge-sans-paille commented 5 years ago

I assume you found out that -fno-exceptions is supported?

alex31 commented 5 years ago

Le Tue, 29 Oct 2019 12:37:26 -0700, serge-sans-paille notifications@github.com a écrit :

I assume you found out that -fno-exceptions is supported?

sorry to have bother you with that !

yes, i have read the source and found the macro to enable what i needed.

I have seen that there is no constructor to build frozen::string from string_view, i suppose that you want to stick to c++14 and not c++17 ?

Again thank for your smart library, and it's nice to find good quality compile time library, with frozen and a compile time regexp library named ctre, i am able to parse and verify a confiration file from sd card on an MCU in less that 10Ko of rom and 1k of ram.

--

Alexandre