iostream 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_IOSTREAM
  10. #define _LIBCPP_IOSTREAM
  11. /*
  12. iostream synopsis
  13. #include <ios>
  14. #include <istream>
  15. #include <ostream>
  16. #include <streambuf>
  17. namespace std {
  18. extern istream cin;
  19. extern ostream cout;
  20. extern ostream cerr;
  21. extern ostream clog;
  22. extern wistream wcin;
  23. extern wostream wcout;
  24. extern wostream wcerr;
  25. extern wostream wclog;
  26. } // std
  27. */
  28. #include <__assert> // all public C++ headers provide the assertion handler
  29. #include <__config>
  30. #include <ios>
  31. #include <istream>
  32. #include <ostream>
  33. #include <streambuf>
  34. #include <version>
  35. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  36. # pragma GCC system_header
  37. #endif
  38. _LIBCPP_BEGIN_NAMESPACE_STD
  39. #if defined(_MSC_VER) && !defined(__clang__)
  40. extern _LIBCPP_FUNC_VIS istream& cin;
  41. #else
  42. extern _LIBCPP_FUNC_VIS istream cin;
  43. #endif
  44. #if defined(_MSC_VER) && !defined(__clang__)
  45. extern _LIBCPP_FUNC_VIS ostream& cout;
  46. #else
  47. extern _LIBCPP_FUNC_VIS ostream cout;
  48. #endif
  49. #if defined(_MSC_VER) && !defined(__clang__)
  50. extern _LIBCPP_FUNC_VIS ostream& cerr;
  51. extern _LIBCPP_FUNC_VIS ostream& clog;
  52. #else
  53. extern _LIBCPP_FUNC_VIS ostream cerr;
  54. extern _LIBCPP_FUNC_VIS ostream clog;
  55. #endif
  56. #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
  57. #if defined(_MSC_VER) && !defined(__clang__)
  58. extern _LIBCPP_FUNC_VIS wistream& wcin;
  59. #else
  60. extern _LIBCPP_FUNC_VIS wistream wcin;
  61. #endif
  62. #if defined(_MSC_VER) && !defined(__clang__)
  63. extern _LIBCPP_FUNC_VIS wostream& wcout;
  64. #else
  65. extern _LIBCPP_FUNC_VIS wostream wcout;
  66. #endif
  67. #if defined(_MSC_VER) && !defined(__clang__)
  68. extern _LIBCPP_FUNC_VIS wostream& wcerr;
  69. extern _LIBCPP_FUNC_VIS wostream& wclog;
  70. #else
  71. extern _LIBCPP_FUNC_VIS wostream wcerr;
  72. extern _LIBCPP_FUNC_VIS wostream wclog;
  73. #endif
  74. #endif
  75. _LIBCPP_END_NAMESPACE_STD
  76. #endif // _LIBCPP_IOSTREAM