Skip to content

use std::regex instead of boost:: now #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions include/message_logger/log/log_messages_backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ inline const std::string getLogLevel(const message_logger::log::levels::Level& l

#ifdef MELO_FUNCTION_PRINTS
inline std::string parseMemberName(const std::string& in) {
using namespace boost; // todo: replace with std as soon as gcc 4.9.x is standard in ubuntu repo
regex re(".*((:{2}|\\s)([a-zA-Z0-9]*)(<.*>)?(:{2})|\\s+)([a-zA-Z0-9]+)\\s*(<.*>)?\\s*\\(.*\\).*");
smatch match;
if(regex_match(in, match, re)) {
std::regex re(".*((:{2}|\\s)([a-zA-Z0-9]*)(<.*>)?(:{2})|\\s+)([a-zA-Z0-9]+)\\s*(<.*>)?\\s*\\(.*\\).*");
std::smatch match;
if(std::regex_match(in, match, re)) {
return colorFunction + "[" + match.str(3) + match.str(5) + match.str(6) + "] ";
}
return std::string();
Expand Down