From f7cf84bd56b47728e4674f316d274b3d82a1cfb3 Mon Sep 17 00:00:00 2001 From: 66maer <505670805@qq.com> Date: Thu, 8 Sep 2022 05:33:31 +0800 Subject: [PATCH] Fix std::isblank assertion error in Visual Studio Chinese Debug (#365) --- include/cxxopts.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 76dcc1a..ee02c57 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -2090,12 +2090,12 @@ format_description { appendNewLine = false; - if (std::isblank(*previous)) + if (std::isblank(*previous, std::locale::classic())) { lastSpace = current; } - if (!std::isblank(*current)) + if (!std::isblank(*current, std::locale::classic())) { onlyWhiteSpace = false; }