@pid_eins could you possibly provide it as a header-only library out of the box? Static function, shouldn't be that crazy.
Top-level
5 comments
@pid_eins duuuh. Is notify used more than than a couple times anyway to mess up that much? But I guess you're right that the standard doesn't give us out of the box easy experience to declare I-don't-care-about-address-uniqueness-just-link-it functions. @thephd sorry to bother, is it even a popular use case? I definenelty wrote a couple of static-not-inline function in some internal headers of my projects. @ldvsoft @pid_eins It's not an entirely uncommon use case but the fix is to provide a header file and a source file with the usual boilerplate to make it link either statically with a public-visibility function or a DLL with a public-visibility exported entry in the DLL. your distro maintainers will fight over who gets the honor of making it an official dependable package if they care. |
@ldvsoft i am not a fan of those. Static inline funcs suggest inlining to the compiler and we typically want that services call these functions multiple times (ready notification + reload notification at least) hence inlining is the wrong thing. I mean hopefully the compiler figures this out on its own, but given LTO is not pervasively used today there'll be plenty cases where the code wont be reduced to a single copy.