mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-07 19:43:43 +08:00
a3e4cd810c
* src/c++98/Makefile.am: Move ctype.cc, ctype_configure_char.cc and ctype_members.cc to ... * src/c++11/Makefile.am: Here. * src/c++98/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++98/ctype.cc: Move file to ... * src/c++11/ctype.cc: Here, define ctype_base::blank. * config/abi/pre/gnu.ver: Export ctype_base::blank. * config/locale/generic/ctype_members.cc (ctype<wchar_t>::_M_convert_to_wmask): Handle blank. Update comments. * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::_M_convert_to_wmask): Likewise. * config/os/aix/ctype_base.h (ctype_base::blank): Declare. * config/os/bionic/ctype_base.h (ctype_base::blank): Likewise. * config/os/bsd/darwin/ctype_base.h (ctype_base::blank): Declare. * config/os/bsd/darwin/ctype_inline.h (ctype<char>::is): Use blank. (ctype<wchar_t::do_is): Likewise. * config/os/bsd/dragonfly/ctype_base.h (ctype_base::blank): Declare. * config/os/bsd/dragonfly/ctype_inline.h (ctype<char>::is): Use blank. (ctype<wchar_t::do_is): Likewise. * config/os/bsd/freebsd/ctype_base.h (ctype_base::blank): Declare. * config/os/bsd/freebsd/ctype_inline.h (ctype<char>::is): Use blank. (ctype<wchar_t::do_is): Likewise. * config/os/bsd/netbsd/ctype_base.h (ctype_base::blank): Declare. * config/os/bsd/openbsd/ctype_base.h (ctype_base::blank): Likewise. * config/os/djgpp/ctype_base.h (ctype_base::blank): Likewise. * config/os/generic/ctype_base.h (ctype_base::blank): Declare. * config/os/generic/ctype_inline.h (ctype<char>::is): Use blank. * config/os/gnu-linux/ctype_base.h (ctype_base::blank): Declare. * config/os/hpux/ctype_base.h (ctype_base::blank): Likewise. * config/os/mingw32-w64/ctype_base.h (ctype_base::blank): Declare. * config/os/mingw32-w64/ctype_configure_char.cc (ctype<char>::classic_table()): Set blank bit for space and tab. * config/os/mingw32/ctype_base.h (ctype_base::blank): Declare. * config/os/mingw32/ctype_configure_char.cc (ctype<char>::classic_table()): Set blank bit for space and tab. * config/os/newlib/ctype_base.h (ctype_base::blank): Declare. * config/os/qnx/qnx6.1/ctype_base.h (ctype_base::blank): Likewise. * config/os/solaris/solaris2.10/ctype_base.h (ctype_base::blank): Likewise. * config/os/tpf/ctype_base.h (ctype_base::blank): Likewise. * config/os/uclibc/ctype_base.h (ctype_base::blank): Likewise. * config/os/vxworks/ctype_base.h (ctype_base::blank): Likewise. * include/bits/locale_facets.h (isblank): Define. * include/bits/localefwd.h (isblank): Declare. * testsuite/22_locale/classification/isblank.cc: New. * testsuite/22_locale/ctype_base/blank.cc: New. From-SVN: r216464
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// Copyright (C) 2014 Free Software Foundation, Inc.
|
|
//
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
// software; you can redistribute it and/or modify it under the
|
|
// terms of the GNU General Public License as published by the
|
|
// Free Software Foundation; either version 3, or (at your option)
|
|
// any later version.
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
// with this library; see the file COPYING3. If not see
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
// { dg-options " -std=gnu++11 " }
|
|
|
|
// 22.3.3.1 Character classification [classification]
|
|
|
|
#include <locale>
|
|
#include <testsuite_hooks.h>
|
|
|
|
typedef char char_type;
|
|
|
|
void
|
|
test01()
|
|
{
|
|
bool test __attribute__((unused)) = true;
|
|
VERIFY( std::isblank(' ', std::locale::classic()) );
|
|
VERIFY( std::isblank('\t', std::locale::classic()) );
|
|
}
|
|
|
|
void
|
|
test02()
|
|
{
|
|
#ifdef _GLIBCXX_USE_WCHAR_T
|
|
bool test __attribute__((unused)) = true;
|
|
VERIFY( std::isblank(L' ', std::locale::classic()) );
|
|
VERIFY( std::isblank(L'\t', std::locale::classic()) );
|
|
#endif
|
|
}
|
|
|
|
int main()
|
|
{
|
|
test01();
|
|
test02();
|
|
}
|