You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ya...@apache.org on 2020/11/27 00:48:50 UTC
[incubator-nuttx-apps] branch master updated: examples/cctye:
change std::isascii to isascii
This is an automated email from the ASF dual-hosted git repository.
yamamoto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 0eac035 examples/cctye: change std::isascii to isascii
0eac035 is described below
commit 0eac03524508fd9bf068ffc8ba9c1e9eff5c66c3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Nov 24 11:13:12 2020 +0800
examples/cctye: change std::isascii to isascii
since isascii isn't a standard defined function and then
may not exist in all cctype header file(e.g. libc++):
cctype_main.cxx: In function 'int cctype_main(int, char**)':
cctype_main.cxx:64:45: error: 'isascii' is not a member of 'std'; did you mean 'isascii'?
64 | std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(i),
| ^~~~~~~
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I8c4fd5ccf120ae5a1566cd4d90695e47ffc30cad
---
examples/cctype/cctype_main.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/cctype/cctype_main.cxx b/examples/cctype/cctype_main.cxx
index f2fbea5..13e626d 100644
--- a/examples/cctype/cctype_main.cxx
+++ b/examples/cctype/cctype_main.cxx
@@ -61,7 +61,7 @@ extern "C"
int lower = std::tolower(i);
std::printf("%3d %c %d %d %d %d %d %d %d %d %d %d %d %d %d %c %c\n",
i, std::isprint(i) ? i : '.',
- std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(i),
+ std::isspace(i), isascii(i) , std::isprint(i), std::isgraph(i),
std::iscntrl(i), std::islower(i), std::isupper(i), std::isalpha(i),
std::isblank(i), std::isdigit(i), std::isalnum(i), std::ispunct(i),
std::isxdigit(i),