xte ::logger ::error {}
Defined in header <xte/io/logger.hpp> Prints a message with an 'ERROR' prefix. The object is intended to be discarded after construction. Text is colored only when printing to a TTY.
Definition
template <typename... Args >struct error {explicit error (std ::format_string <Args ...>,Args &&... )noexcept (false );explicit error (std ::FILE * ,std ::format_string <Args ...>,Args &&... )noexcept (false ); };template <typename... Args >error (std ::format_string <Args ...>,Args &&... ) ->error <Args ...>;template <typename... Args >error (std ::FILE * ,std ::format_string <Args ...>,Args &&... ) ->error <Args ...>;
Example
Possible output:xte ::logger ::error ("Hello, world!" );
ERROR [2026-04-13 20:15:20] main.cpp:int main():4: Hello, world!
[View in Compiler Explorer]