diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-25 08:45:20 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-03-25 08:45:20 +0100 |
commit | 535b1ab32d979ba8654f854e52c705037b046c7b (patch) | |
tree | 76aaaac24b6c374a312d4183e71d3d9ca7a2a6c8 | |
parent | fea44429717657ab17de669c487960f56071a2da (diff) | |
download | dabmux-535b1ab32d979ba8654f854e52c705037b046c7b.tar.gz dabmux-535b1ab32d979ba8654f854e52c705037b046c7b.tar.bz2 dabmux-535b1ab32d979ba8654f854e52c705037b046c7b.zip |
Replace std::regex with boost::regex
This should allow us to support ubuntu 14.04 LTS and other distributions
that do not ship a complete C++11 stdlib
-rw-r--r-- | src/ClockTAI.cpp | 8 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ClockTAI.cpp b/src/ClockTAI.cpp index 5334bbd..22d4d9d 100644 --- a/src/ClockTAI.cpp +++ b/src/ClockTAI.cpp @@ -43,7 +43,7 @@ #include <string> #include <iostream> #include <algorithm> -#include <regex> +#include <boost/regex.hpp> /* Last line from bulletin, example: 2015 JUL 1 =JD 2457204.5 TAI-UTC= 36.0 S + (MJD - 41317.) X 0.0 S @@ -99,7 +99,7 @@ int ClockTAI::update_local_tai_clock(int offset) int ClockTAI::parse_tai_offset() { - std::regex regex_offset("TAI-UTC= *([0-9.]+)"); + boost::regex regex_offset("TAI-UTC= *([0-9.]+)"); int tai_utc_offset = 0; @@ -108,9 +108,9 @@ int ClockTAI::parse_tai_offset() for (std::string line; std::getline(m_bulletin, line); ) { linecount++; auto words_begin = - std::sregex_token_iterator( + boost::sregex_token_iterator( line.begin(), line.end(), regex_offset, 1); - auto words_end = std::sregex_token_iterator(); + auto words_end = boost::sregex_token_iterator(); for (auto w = words_begin; w != words_end; ++w) { std::string s(*w); diff --git a/src/Makefile.am b/src/Makefile.am index 2d3ee24..0cc51c2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,7 +52,7 @@ endif odr_dabmux_CFLAGS =-Wall -I$(FARSYNC_DIR) $(GITVERSION_FLAGS) odr_dabmux_CXXFLAGS =-Wall -I$(FARSYNC_DIR) $(GITVERSION_FLAGS) odr_dabmux_LDADD =$(FEC_LIBS) $(ZMQ_LIBS) $(CURL_LIBS) \ - -lpthread -lboost_thread -lboost_system + -lpthread -lboost_thread -lboost_system -lboost_regex odr_dabmux_SOURCES =DabMux.cpp DabMux.h \ DabMultiplexer.cpp DabMultiplexer.h \ dabInput.h dabInput.cpp \ |