From f0f43d4b9dd9ac457927bd68da4b85c852195074 Mon Sep 17 00:00:00 2001 From: 66maer <505670805@qq.com> Date: Thu, 1 Sep 2022 16:56:24 +0800 Subject: [PATCH] Fix std::isblank assertion error in Visual Studio Chinese Debug --- 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; }