A user would define the preprocessor macro DOCOPT_HEADER_ONLY to control this behavior. This cause the cpp file to be included with the header file.
I've moved most of the inline functions out of docopt.cpp to docopt_private.h as I was making them inline to remove them from the symbol table in Header only mode, so I thought it would be best to put them closer to the functions.
I've tested by building with clang on Mac, and I see a small change in the size of the lib (<1 kbyte smaller).
Changes to make docopt.cpp header only.
A user would define the preprocessor macro DOCOPT_HEADER_ONLY to control this behavior. This cause the cpp file to be included with the header file.
I've moved most of the inline functions out of docopt.cpp to docopt_private.h as I was making them inline to remove them from the symbol table in Header only mode, so I thought it would be best to put them closer to the functions.
I've tested by building with clang on Mac, and I see a small change in the size of the lib (<1 kbyte smaller).