From 005c929899b7d4b17d0914a91446812b670c7051 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Wed, 30 Aug 2017 19:58:20 +0200 Subject: [PATCH] Fixup integer pattern multiple definition --- include/cxxopts.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index ff17ec4..290daed 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -428,11 +428,6 @@ namespace cxxopts namespace values { - namespace - { - std::basic_regex integer_pattern - ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|(0)"); - } namespace detail { @@ -484,6 +479,8 @@ namespace cxxopts integer_parser(const std::string& text, T& value) { std::smatch match; + std::basic_regex integer_pattern + ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|(0)"); std::regex_match(text, match, integer_pattern); if (match.length() == 0)