From 318055b811e1578027431a31ecaadd7c8fb6177f Mon Sep 17 00:00:00 2001 From: Masashi Fujita Date: Mon, 4 Dec 2017 02:42:34 +0900 Subject: [PATCH] =?UTF-8?q?`|`=20should=20be=20inside=20of=20`(=E2=80=A6)`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's possible to use `(t|true|T|True)` as `truthy_pattern` but still failing `true` as a truthy under my environment :-( ``` Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ``` \# clang-5.0.0 works as expected even if does not modify it. --- include/cxxopts.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 49ade40..5068e67 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -444,7 +444,7 @@ namespace cxxopts std::basic_regex integer_pattern ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|((0x)?0)"); std::basic_regex truthy_pattern - ("t|true|T|True"); + ("(t|T)(rue)?"); std::basic_regex falsy_pattern ("(f|false|F|False)?"); }