Re:Std: Clamp generates less efficient assembly than std:min...
by mort96 on Tuesday January 16, 2024 @11:02AM
(#39014852)
It's not just about being header-only, lots of libraries which aren't header-only still have code in headers. The library may choose to put certain functions in headers for performance reasons (to let compiler inline them), or, in C++, function templates and class templates generally have to be in headers.
But yeah, it's probably a good idea to not put code which breaks under -ffast-math in headers if possible.
But yeah, it's probably a good idea to not put code which breaks under -ffast-math in headers if possible.