1
0

include_httplib.cc 818 B

123456789101112131415161718
  1. // Includes httplib.h in a separate compilation unit, thus verifying that
  2. // inline keywords have not been forgotten when linked together with test.cc.
  3. #include <httplib.h>
  4. // Nothing in the library calls these, but subclasses that override
  5. // process_and_close_socket() do. Instantiating them here, where the split build
  6. // does not reach, keeps a change to process_server_socket_core() from breaking
  7. // them unnoticed.
  8. struct IncludeHttplibServeNothing {
  9. bool operator()(httplib::Stream &, bool, bool &) const { return false; }
  10. };
  11. auto include_httplib_process_server_socket =
  12. &httplib::detail::process_server_socket<IncludeHttplibServeNothing>;
  13. #ifdef CPPHTTPLIB_SSL_ENABLED
  14. auto include_httplib_process_server_socket_ssl =
  15. &httplib::detail::process_server_socket_ssl<IncludeHttplibServeNothing>;
  16. #endif