fune/tools/clang-tidy/test/performance-avoid-endl.cpp
Andi-Bogdan Postelnicu 72276f379c Bug 1855848 - fix infra bust for static-analysis autotest. r=sylvestre DONTBUILD
This is because the std is not located in the default location where the compiler
searches.
This is normal, but for autotest we don't generate a compile commands through the build
system, we generate a dummy one, with dummy paths so we need to transplant definitions
from std to the test files.

Differential Revision: https://phabricator.services.mozilla.com/D189619
2023-09-29 22:01:46 +00:00

34 lines
740 B
C++

namespace std {
template <typename CharT>
class basic_ostream {
public:
template <typename T>
basic_ostream& operator<<(T);
basic_ostream& operator<<(basic_ostream<CharT>& (*)(basic_ostream<CharT>&));
};
template <typename CharT>
class basic_iostream : public basic_ostream<CharT> {};
using ostream = basic_ostream<char>;
using wostream = basic_ostream<wchar_t>;
using iostream = basic_iostream<char>;
using wiostream = basic_iostream<wchar_t>;
ostream cout;
wostream wcout;
ostream cerr;
wostream wcerr;
ostream clog;
wostream wclog;
template<typename CharT>
basic_ostream<CharT>& endl(basic_ostream<CharT>&);
} // namespace std
int main() {
std::cout << "Hello" << std::endl;
}