From Igor Tandetnik:
cppreference has this to say: (1) a
constevalspecifier impliesinline; and (2) The definition of an inline function must be reachable in the translation unit where it is accessed. I'm 99% sure you won't be able to hide the definition ofconstevalfunction in the library; you'd have to put it into the header.