diff --git a/CMakeLists.txt b/CMakeLists.txt index 4db200c..041b4ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.1.0) project(monero-lws) enable_language(CXX) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) option(BUILD_TESTS "Build Tests" OFF) diff --git a/tests/unit/rest.test.cpp b/tests/unit/rest.test.cpp index 8e421f4..1f17b04 100644 --- a/tests/unit/rest.test.cpp +++ b/tests/unit/rest.test.cpp @@ -27,7 +27,7 @@ #include "framework.test.h" -#include +#include #include "db/data.h" #include "db/storage.test.h" #include "db/string.h" @@ -111,7 +111,7 @@ LWS_CASE("rest_server") SETUP("Database and login") { - std::optional server; + boost::optional server; lws::db::test::cleanup_db on_scope_exit{}; lws::db::storage db = lws::db::test::get_fresh_db(); auto context = diff --git a/tests/unit/wire/read.test.cpp b/tests/unit/wire/read.test.cpp index 22bcf4e..c962669 100644 --- a/tests/unit/wire/read.test.cpp +++ b/tests/unit/wire/read.test.cpp @@ -47,7 +47,7 @@ namespace { EXPECT(Target(0) == wire::integer::cast_unsigned(std::uintmax_t(0))); EXPECT(limit::max() == wire::integer::cast_unsigned(std::uintmax_t(limit::max()))); - if constexpr (limit::max() < max) + if (limit::max() < max) { EXPECT_THROWS_AS(wire::integer::cast_unsigned(std::uintmax_t(limit::max()) + 1), wire::exception); EXPECT_THROWS_AS(wire::integer::cast_unsigned(max), wire::exception); @@ -68,7 +68,7 @@ namespace SETUP("intmax_t to " + boost::core::demangle(typeid(Target).name())) { - if constexpr (min < limit::min()) + if (min < limit::min()) { EXPECT_THROWS_AS(wire::integer::cast_signed(std::intmax_t(limit::min()) - 1), wire::exception); EXPECT_THROWS_AS(wire::integer::cast_signed(min), wire::exception); @@ -76,7 +76,7 @@ namespace EXPECT(limit::min() == wire::integer::cast_signed(std::intmax_t(limit::min()))); EXPECT(Target(0) == wire::integer::cast_signed(std::intmax_t(0))); EXPECT(limit::max() == wire::integer::cast_signed(std::intmax_t(limit::max()))); - if constexpr (limit::max() < max) + if (limit::max() < max) { EXPECT_THROWS_AS(wire::integer::cast_signed(std::intmax_t(limit::max()) + 1), wire::exception); EXPECT_THROWS_AS(wire::integer::cast_signed(max), wire::exception);