diff --git a/README.md b/README.md index 8e2da8ae..b0a4c0e8 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ libhttpserver can be used without any dependencies aside from libmicrohttpd. The minimum versions required are: * g++ >= 5.5.0 or clang-3.6 +* C++17 or newer * libmicrohttpd >= 0.9.64 * [Optionally]: for TLS (HTTPS) support, you'll need [libgnutls](http://www.gnutls.org/). * [Optionally]: to compile the code-reference, you'll need [doxygen](http://www.doxygen.nl/). diff --git a/src/httpserver.hpp b/src/httpserver.hpp index 100e7276..8b706613 100644 --- a/src/httpserver.hpp +++ b/src/httpserver.hpp @@ -21,6 +21,10 @@ #ifndef SRC_HTTPSERVER_HPP_ #define SRC_HTTPSERVER_HPP_ +#if __cplusplus < 201703L +# error("libhttpserver requires C++17 or later.") +#endif + #define _HTTPSERVER_HPP_INSIDE_ #include "httpserver/basic_auth_fail_response.hpp"