changed: use std::regex instead of boost::regex

This commit is contained in:
Arne Morten Kvarving 2019-09-18 14:54:17 +02:00
parent 01b0dcaedf
commit 7876f530a1
4 changed files with 6 additions and 6 deletions

View File

@ -32,7 +32,7 @@ if(NOT cjson_FOUND)
endif()
add_executable(genkw ${genkw_SOURCES})
target_link_libraries(genkw Boost::regex Boost::filesystem Boost::system)
target_link_libraries(genkw Boost::filesystem Boost::system)
# Generate keyword list
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)

View File

@ -17,7 +17,7 @@ if(ENABLE_ECL_INPUT)
list(APPEND opm-common_DEPS
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS system filesystem unit_test_framework regex REQUIRED")
COMPONENTS system filesystem unit_test_framework REQUIRED")
else()
list(APPEND opm-common_DEPS
# various runtime library enhancements

View File

@ -23,7 +23,7 @@
#include <string>
#include <set>
#include <boost/regex.hpp>
#include <regex>
#include <opm/parser/eclipse/Parser/ParserEnums.hpp>
#include <opm/parser/eclipse/Parser/ParserRecord.hpp>
@ -148,7 +148,7 @@ namespace Opm {
DeckNameSet m_deckNames;
DeckNameSet m_validSectionNames;
std::string m_matchRegexString;
boost::regex m_matchRegex;
std::regex m_matchRegex;
std::vector< ParserRecord > m_records;
enum ParserKeywordSizeEnum m_keywordSizeType;
size_t m_fixedSize;

View File

@ -639,7 +639,7 @@ void set_dimensions( ParserItem& item,
void ParserKeyword::setMatchRegex(const std::string& deckNameRegexp) {
try {
m_matchRegex = boost::regex(deckNameRegexp);
m_matchRegex = std::regex(deckNameRegexp);
m_matchRegexString = deckNameRegexp;
}
catch (const std::exception &e) {
@ -659,7 +659,7 @@ void set_dimensions( ParserItem& item,
return true;
else if (hasMatchRegex())
return boost::regex_match( name.begin(), name.end(), m_matchRegex);
return std::regex_match( name.begin(), name.end(), m_matchRegex);
return false;
}