mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
887074efd2
In order to test the split version (.h + .cc via split.py): - Added a test_split program in the test directory whose main purpose is to verify that it works to compile and link the test case code against the split httplib.h version. - Moved types needed for test cases to the “header part” of httplib.h. Also added forward declarations of functions needed by test cases. - Added an include_httplib.cc file which is linked together with test.cc to verify that inline keywords have not been forgotten. The changes to httplib.h just move code around (or add forward declarations), with one exception: detail::split and detail::process_client_socket have been converted to non-template functions (taking an std::function instead of using a type parameter for the function) and forward-declared instead. This avoids having to move the templates to the “header part”.
5 lines
212 B
C++
5 lines
212 B
C++
// The sole purpose of this file is to include httplib.h in a separate
|
|
// compilation unit, thus verifying that inline keywords have not been forgotten
|
|
// when linked together with test.cc.
|
|
|
|
#include <httplib.h>
|