boost_no_cwctype.ipp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_NO_CWCTYPE
  7. // TITLE: <wctype.h> and <cwctype>
  8. // DESCRIPTION: The Platform does not provide <wctype.h> and <cwctype>.
  9. //
  10. // Note that some platforms put these prototypes in the wrong headers,
  11. // we have to include pretty well all the string headers on the chance that
  12. // one of them will contain what we want!
  13. //
  14. #include <cwctype>
  15. #include <wctype.h>
  16. #include <cwchar>
  17. #include <wchar.h>
  18. #include <cctype>
  19. #include <ctype.h>
  20. namespace boost_no_cwctype{
  21. int test()
  22. {
  23. if(!(iswalpha(L'a') &&
  24. iswcntrl(L'\r') &&
  25. iswdigit(L'2') &&
  26. iswlower(L'a') &&
  27. iswpunct(L',') &&
  28. iswspace(L' ') &&
  29. iswupper(L'A') &&
  30. iswxdigit(L'A')
  31. )) return -1;
  32. if(L'a' != towlower(L'A')) return -1;
  33. return 0;
  34. }
  35. }