include_httplib.cc 855 B

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