moshiba / ansi-escape

ANSI escape codes wrapped in C++ streams
https://hsuantinglu.github.io/ansi-escape/
MIT License
0 stars 1 forks source link

Use unformatted output when possible #17

Open moshiba opened 3 years ago

moshiba commented 3 years ago

e.g. https://github.com/HsuanTingLu/ansi-escape/blob/de0a162c7e10f43b9b7ec15ab7af088a2a0ad816/aesc/control/cursor.cpp#L31-L36

use std::cout.write() instead

moshiba commented 3 years ago

Problem

some arguments are not character arrays, such as x in https://github.com/HsuanTingLu/ansi-escape/blob/de0a162c7e10f43b9b7ec15ab7af088a2a0ad816/aesc/control/cursor.cpp#L32

should we use formatted output here? (std::cout.write(CSI_expr).operator<<(x).write(down_expr);) or upgrade to C++17 and use charconv, or roll out our own formatting helpers