cosmopolitan/ctl/ostream.h

57 lines
1.2 KiB
C
Raw Normal View History

2024-06-29 22:45:09 +00:00
// -*-mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8-*-
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
#ifndef CTL_OSTREAM_H_
#define CTL_OSTREAM_H_
#include "ios.h"
namespace ctl {
struct string_view;
class ostream : public ios
{
public:
ostream() = delete;
explicit ostream(FILE*);
virtual ~ostream();
ostream& operator<<(const char*);
2024-07-01 12:40:38 +00:00
ostream& operator<<(bool);
2024-06-29 22:45:09 +00:00
ostream& operator<<(char);
ostream& operator<<(int);
2024-07-01 12:40:38 +00:00
ostream& operator<<(unsigned);
2024-06-29 22:45:09 +00:00
ostream& operator<<(long);
2024-07-01 12:40:38 +00:00
ostream& operator<<(unsigned long);
ostream& operator<<(float);
2024-06-29 22:45:09 +00:00
ostream& operator<<(double);
2024-07-01 10:48:28 +00:00
ostream& operator<<(const ctl::string_view&);
2024-06-29 22:45:09 +00:00
ostream& operator<<(ostream& (*)(ostream&));
ostream& put(char);
ostream& write(const char*, streamsize);
ostream& flush();
ostream(ostream&&) noexcept;
ostream& operator=(ostream&&) noexcept;
private:
ostream(const ostream&) = delete;
ostream& operator=(const ostream&) = delete;
};
extern ostream cout;
extern ostream cerr;
ostream&
endl(ostream&);
ostream&
ends(ostream&);
ostream&
flush(ostream&);
} // namespace ctl
#endif // CTL_OSTREAM_H_