std::operat...error_code)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

okay bestie, welcome to the std::operator<<(std::error_code) page from the C++ Standard Libary manual, section 3 β€” yes, manual name folded in near the top, header line not copied, we're being so good πŸ’…. The NAME is literally std::operator<<(std::error_code) β€” std::operator<<(std::error_code). It's giving "operator shift left but make it error codes," and honestly? iconic.

✨ Synopsis ✨

Defined in header <system_error>:

template< class CharT, class Traits >

std::basic_ostream<CharT, Traits>&
(since C++11)

    operator<<( basic_ostream<CharT, Traits>& os, const error_code&
ec );

This overload has been around since C++11 β€” not new, but still main character energy. It performs the stream output operation on error code ec, fr fr.

Equivalent to:

os << ec.category().name() << ':' << ec.value()

Like, literally that. No cap. 🫢

πŸŽ€ Parameters πŸŽ€

  • os β€” output stream to insert data to. That's the stream bestie is writing into.
  • ec β€” error code. The error code in question, periodt.

πŸ’– Return value πŸ’–

os β€” the output stream, returned right back to you. That's the whole return value, slay. ✨


that's the page, bestie πŸ’– source/version: http://cppreference.com, date: 2024.06.10, and the footer tag is std::operat...error_code)(3). mwah 😘

πŸ“¦ where this page comes from