0library.cpp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Simple test file for cxxomfort
  3. * When compiled and run, this will print information about the
  4. * C++ and cxxomfort install.
  5. *
  6. * 0info.cpp is a much simpler version that only
  7. * outputs the information of cxxomfort's info object.
  8. *
  9. * This and other examples assume cxxomfort is installed in
  10. * include library path; if otherwise, set eg.: -I flag accordingly.
  11. */
  12. //#define CXXOMFORT_NOTICES 2
  13. #include <cxxomfort/base.hpp>
  14. #include <cxxomfort/backports.hpp>
  15. #include <cxxomfort/library.hpp>
  16. //#include <cxxomfort/library/ctime.hpp>
  17. //#include <cxxomfort/library/expected.hpp>
  18. #include <cxxomfort/library/numeric.hpp>
  19. #include <cxxomfort/library/ratio.hpp>
  20. // library features
  21. #include <cxxomfort/library/array_ref.hpp>
  22. #include <cxxomfort/library/fixed_vector.hpp>
  23. //#include <cxxomfort/library/static_vector.hpp>
  24. #include <iterator>
  25. #include <iostream>
  26. #define ZSHOW_SUPPORT(macro) (CXXO_IF_MACRO(macro,'C') ? ("" #macro " : " CXXO_STRINGIZE(macro) "\n") : "")
  27. int main () {
  28. using namespace std;
  29. cxxomfort::output_info(stdout);
  30. cout<< endl;
  31. cout<< "<algorithm>"<< endl;
  32. cout<< ZSHOW_SUPPORT(CXXO_LIB_is_clamped);
  33. cout<< ZSHOW_SUPPORT(CXXO_LIB_clamp_halfopen);
  34. cout<< ZSHOW_SUPPORT(CXXO_LIB_minmax_function_element);
  35. cout<< ZSHOW_SUPPORT(CXXO_LIB_map_frequencies);
  36. cout<< ZSHOW_SUPPORT(CXXO_LIB_unstable_remove);
  37. cout<< ZSHOW_SUPPORT(CXXO_LIB_find_predicate2);
  38. cout<< ZSHOW_SUPPORT(CXXO_LIB_eraseif);
  39. cout<< ZSHOW_SUPPORT(CXXO_LIB_transform_inplace);
  40. cout<< "<functional>:"<< endl;
  41. cout<< ZSHOW_SUPPORT(CXXO_LIB_ptr_fun_nullary);
  42. cout<< ZSHOW_SUPPORT(CXXO_LIB_function_ref);
  43. cout<< ZSHOW_SUPPORT(CXXO_LIB_equivalent_to);
  44. cout<< ZSHOW_SUPPORT(CXXO_LIB_leftassign_operators);
  45. cout<< ZSHOW_SUPPORT(CXXO_LIB_overload_pattern);
  46. cout<< "<iterator>:"<< endl;
  47. cout<< ZSHOW_SUPPORT(CXXO_LIB_function_iterator);
  48. cout<< ZSHOW_SUPPORT(CXXO_LIB_indirect_iterator);
  49. cout<< ZSHOW_SUPPORT(CXXO_LIB_ssize);
  50. cout<< "<memory>:"<< endl;
  51. cout<< ZSHOW_SUPPORT(CXXO_LIB_scoped_ptr);
  52. cout<< ZSHOW_SUPPORT(CXXO_LIB_noexcept_allocator);
  53. cout<< "<numeric>:"<< endl;
  54. cout<< ZSHOW_SUPPORT(CXXO_LIB_egcd);
  55. cout<< ZSHOW_SUPPORT(CXXO_LIB_to_signed);
  56. cout<< "<ostream>:"<< endl;
  57. cout<< "<random>:"<< endl;
  58. cout<< ZSHOW_SUPPORT(CXXO_LIB_uniform_pick_choose);
  59. cout<< ZSHOW_SUPPORT(CXXO_LIB_lcg_variants);
  60. cout<< ZSHOW_SUPPORT(CXXO_LIB_prng_rand48);
  61. cout<< ZSHOW_SUPPORT(CXXO_LIB_prng_splitmix);
  62. cout<< "<ratio>:"<< endl;
  63. cout<< ZSHOW_SUPPORT(CXXO_LIB_iso80000_bi_prefixes);
  64. cout<< "<tuple>:"<< endl;
  65. cout<< ZSHOW_SUPPORT(CXXO_LIB_tuple_index);
  66. cout<< ZSHOW_SUPPORT(CXXO_LIB_tuple_shift_unshift);
  67. cout<< ZSHOW_SUPPORT(CXXO_LIB_tuple_pop_push);
  68. cout<< ZSHOW_SUPPORT(CXXO_LIB_for_tuple);
  69. cout<< "<type_traits>:"<< endl;
  70. cout<< ZSHOW_SUPPORT(CXXO_LIB_integral_constant_literals);
  71. cout<< ZSHOW_SUPPORT(CXXO_LIB_is_scoped_enum);
  72. cout<< ZSHOW_SUPPORT(CXXO_LIB_is_propagate_cv);
  73. cout<< "<utility>:"<< endl;
  74. cout<< ZSHOW_SUPPORT(CXXO_LIB_absdiff);
  75. cout<< ZSHOW_SUPPORT(CXXO_LIB_take);
  76. cout<< ZSHOW_SUPPORT(CXXO_LIB_swap_if);
  77. cout<< ZSHOW_SUPPORT(CXXO_LIB_pair_aggregate);
  78. cout<< "\n\n";
  79. cout<< "Library Features:"<< endl;
  80. cout<< ZSHOW_SUPPORT(CXXO_LIB_array_ref);
  81. cout<< ZSHOW_SUPPORT(CXXO_LIB_baseconv);
  82. cout<< ZSHOW_SUPPORT(CXXO_LIB_fixed_vector);
  83. cout<< ZSHOW_SUPPORT(CXXO_LIB_if_int128);
  84. cout<< ZSHOW_SUPPORT(CXXO_LIB_foreach);
  85. cout<< ZSHOW_SUPPORT(CXXO_LIB_siesta_code);
  86. cout<< ZSHOW_SUPPORT(CXXO_LIB_static_vector);
  87. }