]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/config/test/boost_no_ctype_functions.ipp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_ctype_functions.ipp
CommitLineData
7c673cae
FG
1// (C) Copyright John Maddock 2001.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6// See http://www.boost.org/libs/config for most recent version.
7
8// MACRO: BOOST_NO_CTYPE_FUNCTIONS
9// TITLE: functions in <ctype.h>
10// DESCRIPTION: The Platform does not provide functions for the character-
11// classifying operations in <ctype.h>. Some platforms provide
12// macros and don't provide functions. Under C++ it's an error
13// to provide the macros at all, but that's a separate issue.
14
1e59de90 15#include <cctype>
7c673cae
FG
16
17namespace boost_no_ctype_functions {
18
7c673cae
FG
19int test()
20{
1e59de90
TL
21 using std::isalpha;
22 using std::isalnum;
23 using std::iscntrl;
24 using std::isdigit;
25 using std::isgraph;
26 using std::islower;
27 using std::isprint;
28 using std::ispunct;
29 using std::isspace;
30 using std::isupper;
31 using std::isxdigit;
32
33 int r = 0;
34 char c = 'a';
35
36 r |= (isalpha)(c);
37 r |= (isalnum)(c);
38 r |= (iscntrl)(c);
39 r |= (isdigit)(c);
40 r |= (isgraph)(c);
41 r |= (islower)(c);
42 r |= (isprint)(c);
43 r |= (ispunct)(c);
44 r |= (isspace)(c);
45 r |= (isupper)(c);
46 r |= (isxdigit)(c);
47
48 return r == 0 ? 1 : 0;
7c673cae
FG
49}
50
51}
52