iostream 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 <__config>
  29. #include <ios>
  30. #include <istream>
  31. #include <ostream>
  32. #include <streambuf>
  33. #include <version>
  34. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  35. # pragma GCC system_header
  36. #endif
  37. _LIBCPP_BEGIN_NAMESPACE_STD
  38. #if defined(_MSC_VER) && !defined(__clang__)
  39. extern _LIBCPP_FUNC_VIS istream& cin;
  40. #else
  41. extern _LIBCPP_FUNC_VIS istream cin;
  42. #endif
  43. #if defined(_MSC_VER) && !defined(__clang__)
  44. extern _LIBCPP_FUNC_VIS ostream& cout;
  45. #else
  46. extern _LIBCPP_FUNC_VIS ostream cout;
  47. #endif
  48. #if defined(_MSC_VER) && !defined(__clang__)
  49. extern _LIBCPP_FUNC_VIS ostream& cerr;
  50. extern _LIBCPP_FUNC_VIS ostream& clog;
  51. #else
  52. extern _LIBCPP_FUNC_VIS ostream cerr;
  53. extern _LIBCPP_FUNC_VIS ostream clog;
  54. #endif
  55. #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
  56. #if defined(_MSC_VER) && !defined(__clang__)
  57. extern _LIBCPP_FUNC_VIS wistream& wcin;
  58. #else
  59. extern _LIBCPP_FUNC_VIS wistream wcin;
  60. #endif
  61. #if defined(_MSC_VER) && !defined(__clang__)
  62. extern _LIBCPP_FUNC_VIS wostream& wcout;
  63. #else
  64. extern _LIBCPP_FUNC_VIS wostream wcout;
  65. #endif
  66. #if defined(_MSC_VER) && !defined(__clang__)
  67. extern _LIBCPP_FUNC_VIS wostream& wcerr;
  68. extern _LIBCPP_FUNC_VIS wostream& wclog;
  69. #else
  70. extern _LIBCPP_FUNC_VIS wostream wcerr;
  71. extern _LIBCPP_FUNC_VIS wostream wclog;
  72. #endif
  73. #endif
  74. _LIBCPP_END_NAMESPACE_STD
  75. #endif // _LIBCPP_IOSTREAM