File: debug_stream_flags.cpp

package info (click to toggle)
seqan3 3.0.2%2Bds-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,052 kB
  • sloc: cpp: 144,641; makefile: 1,288; ansic: 294; sh: 228; xml: 217; javascript: 50; python: 27; php: 25
file content (11 lines) | stat: -rw-r--r-- 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#include <seqan3/core/debug_stream.hpp>

int main()
{
    uint8_t i = 71;
    seqan3::debug_stream << '\'' << i << "'\n";                                           // prints '71' (because flag is set by default)
    seqan3::debug_stream.unsetf(seqan3::fmtflags2::small_int_as_number);                  // unsets the flag
    seqan3::debug_stream << '\'' << i << "'\n";                                           // prints 'G'
    seqan3::debug_stream << seqan3::fmtflags2::small_int_as_number << '\'' << i << "'\n"; // prints '71' again
    // instead of formatting the stream "inline", one can also call .setf()
}