// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_OSTREAM #define _LIBCPP_OSTREAM /* ostream synopsis template > class basic_ostream : virtual public basic_ios { public: // types (inherited from basic_ios (27.5.4)): typedef charT char_type; typedef traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; // 27.7.2.2 Constructor/destructor: explicit basic_ostream(basic_streambuf* sb); basic_ostream(basic_ostream&& rhs); virtual ~basic_ostream(); // 27.7.2.3 Assign/swap basic_ostream& operator=(const basic_ostream& rhs) = delete; // C++14 basic_ostream& operator=(basic_ostream&& rhs); void swap(basic_ostream& rhs); // 27.7.2.4 Prefix/suffix: class sentry; // 27.7.2.6 Formatted output: basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&)); basic_ostream& operator<<(basic_ios& (*pf)(basic_ios&)); basic_ostream& operator<<(ios_base& (*pf)(ios_base&)); basic_ostream& operator<<(bool n); basic_ostream& operator<<(short n); basic_ostream& operator<<(unsigned short n); basic_ostream& operator<<(int n); basic_ostream& operator<<(unsigned int n); basic_ostream& operator<<(long n); basic_ostream& operator<<(unsigned long n); basic_ostream& operator<<(long long n); basic_ostream& operator<<(unsigned long long n); basic_ostream& operator<<(float f); basic_ostream& operator<<(double f); basic_ostream& operator<<(long double f); basic_ostream& operator<<(const void* p); basic_ostream& operator<<(const volatile void* val); // C++23 basic_ostream& operator<<(basic_streambuf* sb); basic_ostream& operator<<(nullptr_t); // 27.7.2.7 Unformatted output: basic_ostream& put(char_type c); basic_ostream& write(const char_type* s, streamsize n); basic_ostream& flush(); // 27.7.2.5 seeks: pos_type tellp(); basic_ostream& seekp(pos_type); basic_ostream& seekp(off_type, ios_base::seekdir); protected: basic_ostream(const basic_ostream& rhs) = delete; basic_ostream(basic_ostream&& rhs); // 27.7.3.3 Assign/swap basic_ostream& operator=(basic_ostream& rhs) = delete; basic_ostream& operator=(const basic_ostream&& rhs); void swap(basic_ostream& rhs); }; // 27.7.2.6.4 character inserters template basic_ostream& operator<<(basic_ostream&, charT); template basic_ostream& operator<<(basic_ostream&, char); template basic_ostream& operator<<(basic_ostream&, char); // signed and unsigned template basic_ostream& operator<<(basic_ostream&, signed char); template basic_ostream& operator<<(basic_ostream&, unsigned char); // NTBS template basic_ostream& operator<<(basic_ostream&, const charT*); template basic_ostream& operator<<(basic_ostream&, const char*); template basic_ostream& operator<<(basic_ostream&, const char*); // signed and unsigned template basic_ostream& operator<<(basic_ostream&, const signed char*); template basic_ostream& operator<<(basic_ostream&, const unsigned char*); // swap: template void swap(basic_ostream& x, basic_ostream& y); template basic_ostream& endl(basic_ostream& os); template basic_ostream& ends(basic_ostream& os); template basic_ostream& flush(basic_ostream& os); // rvalue stream insertion template Stream&& operator<<(Stream&& os, const T& x); template basic_ostream& operator<<(basic_ostream&, wchar_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char8_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char16_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char32_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char8_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char16_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, char32_t) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const wchar_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char8_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char16_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char32_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char8_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char16_t*) = delete; // since C++20 template basic_ostream& operator<<(basic_ostream&, const char32_t*) = delete; // since C++20 // [ostream.formatted.print], print functions template // since C++23 void print(ostream& os, format_string fmt, Args&&... args); template // since C++23 void println(ostream& os, format_string fmt, Args&&... args); void println(ostream& os); // since C++26 void vprint_unicode(ostream& os, string_view fmt, format_args args); // since C++23 void vprint_nonunicode(ostream& os, string_view fmt, format_args args); // since C++23 } // std */ #include <__config> #include <__ostream/basic_ostream.h> #if _LIBCPP_STD_VER >= 23 # include <__ostream/print.h> #endif #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include # include # include # include # include # include # include # include # include #endif #endif // _LIBCPP_OSTREAM