cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
iostream.cpp
Go to the documentation of this file.
1/*
2* cpp-terminal
3* C++ library for writing multi-platform terminal applications.
4*
5* SPDX-FileCopyrightText: 2019-2024 cpp-terminal
6*
7* SPDX-License-Identifier: MIT
8*/
9
11
12#include <array>
13
14namespace
15{
16std::array<char, sizeof(Term::TOstream)> cout_buffer; //NOLINT(fuchsia-statically-constructed-objects)
17std::array<char, sizeof(Term::TOstream)> clog_buffer; //NOLINT(fuchsia-statically-constructed-objects)
18std::array<char, sizeof(Term::TOstream)> cerr_buffer; //NOLINT(fuchsia-statically-constructed-objects)
19std::array<char, sizeof(Term::TIstream)> cin_buffer; //NOLINT(fuchsia-statically-constructed-objects)
20} // namespace
21
22Term::TOstream& Term::cout = reinterpret_cast<Term::TOstream&>(cout_buffer); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
23Term::TOstream& Term::clog = reinterpret_cast<Term::TOstream&>(clog_buffer); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
24Term::TOstream& Term::cerr = reinterpret_cast<Term::TOstream&>(cerr_buffer); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
25Term::TIstream& Term::cin = reinterpret_cast<Term::TIstream&>(cin_buffer); //NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
TOstream & clog
Definition iostream.cpp:23
TOstream & cout
Definition iostream.cpp:22
TOstream & cerr
Definition iostream.cpp:24
TIstream & cin
Definition iostream.cpp:25