[cpp-pistache-server]: Fix build with pistache master branch (#10829)

* fix(cpp-pistache-server): meson/cmake build

* fix(cpp-pistache-server): Upgrade to C++17 and use std::optional

* feat(cpp-pistache-server): Disable running tests during build of nlohmann/json

* feat(samples): Update server/petstore/cpp-pistache
This commit is contained in:
sheabot
2021-11-13 19:15:42 -07:00
committed by GitHub
parent 70737fb1e6
commit f2fcff2945
18 changed files with 60 additions and 58 deletions

View File

@@ -39,7 +39,7 @@ void UserApiImpl::delete_user(const std::string &username, Pistache::Http::Respo
void UserApiImpl::get_user_by_name(const std::string &username, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void UserApiImpl::login_user(const Pistache::Optional<std::string> &username, const Pistache::Optional<std::string> &password, Pistache::Http::ResponseWriter &response) {
void UserApiImpl::login_user(const std::optional<std::string> &username, const std::optional<std::string> &password, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void UserApiImpl::logout_user(Pistache::Http::ResponseWriter &response) {