Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hopefully the standard regex will be constexpr soon.


Not to mention, like... trig functions. I know std::cos et al. need to set errno. Maybe cppfront will get rid of it.


What does cppfront have to do with it? You can write/download/import/enable constexpr implementations of cos with standard c++ compilers?

That’s like saying you can’t drive during winter with your car because it came with summer tires... just change your tires?


Compile with -fno-math-errno. Almost nobody checks errno for math functions, and disabling it can give a huge speedup.


That sets the cmath functions constexpr??


No.


Isn’t the issue with functions like this that they are not guaranteed to be the same on all hardware? So making it constexpr could break programs or cause the constexpr evaluated result to differ from the runtime result even for the same inputs


constexpr cmath is coming in C++23


Whoa slowndown there. Let's get a proper consexpr string support first




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: