template<typename CharT, typename Traits = std::char_traits<CharT>>
class CGAL::IO::Basic_color_streambuf< CharT, Traits >
The class template Basic_color_streambuf wraps another basic_streambuf and automatically adds ANSI color codes to the output.
This is useful for colorizing terminal output with consistent color schemes.
- Template Parameters
-
| CharT | Character type (typically char or wchar_t) |
| Traits | Character traits type |
- See also
- Basic_color_stream_guard
-
make_color_guards
|
|
using | char_type = CharT |
| | Character type.
|
|
using | traits_type = Traits |
| | Character traits type.
|
|
using | int_type = typename traits_type::int_type |
| | Integer type for character representation.
|
|
using | pos_type = typename traits_type::pos_type |
| | Position type for stream positioning.
|
|
using | off_type = typename traits_type::off_type |
| | Offset type for stream positioning.
|
|
using | streambuf_type = std::basic_streambuf<char_type, traits_type> |
| | Type of the wrapped streambuf.
|
|
using | string = std::basic_string<char_type> |
| | String type matching character type.
|
template<typename CharT, typename Traits = std::char_traits<CharT>>
template<typename ... AnsiColors>
constructs a color streambuf wrapper with one or more colors.
Colors are automatically disabled if the wrapped buffer is not connected to a color-capable terminal (checked via isatty() and TERM variable), or if the NO_COLOR environment variable is set and non-empty.
- Template Parameters
-
- Parameters
-