Hacker News new | ask | show | jobs
by electroly 1705 days ago
That's often what "header only" libraries really are -- you create your own .cpp file, define a particular preprocessor symbol, and then include the header which will then produce the implementation in that translation unit. Without the symbol defined you only get the interface, suitable for including in other translation units.