boost_no_ctype_functions.ipp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_CTYPE_FUNCTIONS
  7. // TITLE: functions in <ctype.h>
  8. // DESCRIPTION: The Platform does not provide functions for the character-
  9. // classifying operations in <ctype.h>. Some platforms provide
  10. // macros and don't provide functions. Under C++ it's an error
  11. // to provide the macros at all, but that's a separate issue.
  12. #include <ctype.h>
  13. namespace boost_no_ctype_functions {
  14. extern "C" {
  15. typedef int (* character_classify_function)(int);
  16. }
  17. void pass_function(character_classify_function)
  18. {
  19. }
  20. int test()
  21. {
  22. pass_function(isalpha);
  23. pass_function(isalnum);
  24. pass_function(iscntrl);
  25. pass_function(isdigit);
  26. pass_function(isgraph);
  27. pass_function(islower);
  28. pass_function(isprint);
  29. pass_function(ispunct);
  30. pass_function(isspace);
  31. pass_function(isupper);
  32. pass_function(isxdigit);
  33. return 0;
  34. }
  35. }