Downgrade CXX17 features to CXX14 (#113)

This commit is contained in:
Lee *!* Clagett 2024-04-16 21:33:17 -04:00 committed by GitHub
parent 8f0f0813e1
commit 4f33de5138
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -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)

View file

@ -27,7 +27,7 @@
#include "framework.test.h"
#include <optional>
#include <boost/optional/optional.hpp>
#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<lws::rest_server> server;
boost::optional<lws::rest_server> server;
lws::db::test::cleanup_db on_scope_exit{};
lws::db::storage db = lws::db::test::get_fresh_db();
auto context =

View file

@ -47,7 +47,7 @@ namespace
{
EXPECT(Target(0) == wire::integer::cast_unsigned<Target>(std::uintmax_t(0)));
EXPECT(limit::max() == wire::integer::cast_unsigned<Target>(std::uintmax_t(limit::max())));
if constexpr (limit::max() < max)
if (limit::max() < max)
{
EXPECT_THROWS_AS(wire::integer::cast_unsigned<Target>(std::uintmax_t(limit::max()) + 1), wire::exception);
EXPECT_THROWS_AS(wire::integer::cast_unsigned<Target>(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<Target>(std::intmax_t(limit::min()) - 1), wire::exception);
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(min), wire::exception);
@ -76,7 +76,7 @@ namespace
EXPECT(limit::min() == wire::integer::cast_signed<Target>(std::intmax_t(limit::min())));
EXPECT(Target(0) == wire::integer::cast_signed<Target>(std::intmax_t(0)));
EXPECT(limit::max() == wire::integer::cast_signed<Target>(std::intmax_t(limit::max())));
if constexpr (limit::max() < max)
if (limit::max() < max)
{
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(std::intmax_t(limit::max()) + 1), wire::exception);
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(max), wire::exception);