diff --git a/include/crow/app.h b/include/crow/app.h index 76700f8e6..065e45892 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -232,7 +232,10 @@ namespace crow res.end(); }); - if (!router_.blueprints().empty()){ +#if defined(__APPLE__) || defined(__MACH__) + if (!router_.blueprints().empty()) +#endif + { for (Blueprint* bp : router_.blueprints()) { if (!bp->static_dir().empty()) diff --git a/include/crow/json.h b/include/crow/json.h index 0a50ae9f8..de4ec99cb 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -1555,7 +1555,11 @@ namespace crow t_ = type::Object; o = std::unique_ptr(new object(initializer_list)); } else { +#if defined(__APPLE__) || defined(__MACH__) o = std::unique_ptr(new object(initializer_list)); +#else + (*o) = initializer_list; +#endif } return *this; } @@ -1567,7 +1571,11 @@ namespace crow t_ = type::Object; o = std::unique_ptr(new object(value)); } else { +#if defined(__APPLE__) || defined(__MACH__) o = std::unique_ptr(new object(value)); +#else + (*o) = value; +#endif } return *this; }