Neat, but why? Is it just the novelty that it can be done?
I thought it was poor form to have a lot of code in headers. This seems like it'd be better served as a small C http library.
I thought it was poor form to have a lot of code in headers. This seems like it'd be better served as a small C http library.
It would be better if it was namespace'd in some way, at least by using a common unusual prefix for all of the non-local symbols. It wouldn't be hard to clash with the chosen names.
It is mostly because it makes it harder to reuse compiled objects when you make a change and rebuild. For a drop-in library that you're probably not editing, this shouldn't be an issue.