From 738577309d2388dba616701635ae46a84934fef5 Mon Sep 17 00:00:00 2001 From: Nathan Nichols Date: Tue, 22 Feb 2022 17:18:31 -0600 Subject: [PATCH] specify CMAKE_CXX_STANDARD (#102) * specify CMAKE_CXX_STANDARD * add reference to range based for loop --- CMakeLists.txt | 2 ++ src/rpc/handlers/Subscribe.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ac11d27..1c7d75a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16) project(clio VERSION 0.1.0) +set(CMAKE_CXX_STANDARD 20) + option(BUILD_TESTS "Build tests" TRUE) option(VERBOSE "Verbose build" TRUE) diff --git a/src/rpc/handlers/Subscribe.cpp b/src/rpc/handlers/Subscribe.cpp index 07c8f0d2..d5018fe9 100644 --- a/src/rpc/handlers/Subscribe.cpp +++ b/src/rpc/handlers/Subscribe.cpp @@ -281,7 +281,7 @@ subscribeToBooks( std::shared_ptr session, SubscriptionManager& manager) { - for (auto const book : books) + for (auto const& book : books) { manager.subBook(book, session); }