summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-17 09:00:48 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-17 09:00:48 +0100
commitc2e1b31a7c5a948b6155bc9fcaee4defbf4504bd (patch)
treec084aa9db144f1fa75cd08f0b0bdc6b18397fd72
parent36594dedc009dfaa799262a98f8e53fd55450139 (diff)
downloaddabmux-c2e1b31a7c5a948b6155bc9fcaee4defbf4504bd.tar.gz
dabmux-c2e1b31a7c5a948b6155bc9fcaee4defbf4504bd.tar.bz2
dabmux-c2e1b31a7c5a948b6155bc9fcaee4defbf4504bd.zip
Switch project to C++17
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac4
-rw-r--r--src/MuxElements.cpp4
-rw-r--r--src/MuxElements.h6
4 files changed, 8 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 48dcc5e..f5e9c76 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,7 +52,7 @@ lib_charset_sources = lib/charset/charset.cpp \
lib/charset/utf8.h
odr_dabmux_CFLAGS =-Wall $(INCLUDE) $(PTHREAD_CFLAGS) $(GITVERSION_FLAGS)
-odr_dabmux_CXXFLAGS =-Wall -std=c++11 $(PTHREAD_CXXFLAGS) $(INCLUDE) $(GITVERSION_FLAGS) $(BOOST_CPPFLAGS) $(ZMQ_CPPFLAGS)
+odr_dabmux_CXXFLAGS =-Wall $(PTHREAD_CXXFLAGS) $(INCLUDE) $(GITVERSION_FLAGS) $(BOOST_CPPFLAGS) $(ZMQ_CPPFLAGS)
odr_dabmux_LDADD =$(ZMQ_LIBS) $(BOOST_LDFLAGS) \
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(BOOST_SYSTEM_LIB)
diff --git a/configure.ac b/configure.ac
index cc8f9b6..875c56f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# Copyright (C) 2008, 2009 Her Majesty the Queen in Right of Canada
# (Communications Research Center Canada)
#
-# Copyright (C) 2023 Matthias P. Braendli, http://opendigitalradio.org
+# Copyright (C) 2024 Matthias P. Braendli, http://opendigitalradio.org
# This file is part of ODR-DabMux.
#
@@ -34,7 +34,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
-AX_CXX_COMPILE_STDCXX(11,noext,mandatory)
+AX_CXX_COMPILE_STDCXX(17,noext,mandatory)
# Checks for libraries.
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index 71ff270..215a56d 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -86,7 +86,7 @@ bool AnnouncementCluster::is_active()
if (*m_deferred_start_time <= now) {
m_active = true;
- m_deferred_start_time = boost::none;
+ m_deferred_start_time.reset();
}
}
@@ -96,7 +96,7 @@ bool AnnouncementCluster::is_active()
if (*m_deferred_stop_time <= now) {
m_active = false;
- m_deferred_stop_time = boost::none;
+ m_deferred_stop_time.reset();
}
}
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 1e9b707..9990415 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -37,7 +37,7 @@
#include <exception>
#include <algorithm>
#include <chrono>
-#include <boost/optional.hpp>
+#include <optional>
#include <stdint.h>
#include "dabOutput/dabOutput.h"
#include "input/inputs.h"
@@ -150,10 +150,10 @@ class AnnouncementCluster : public RemoteControllable {
private:
mutable std::mutex m_active_mutex;
bool m_active = false;
- boost::optional<
+ std::optional<
std::chrono::time_point<
std::chrono::steady_clock> > m_deferred_start_time;
- boost::optional<
+ std::optional<
std::chrono::time_point<
std::chrono::steady_clock> > m_deferred_stop_time;