A DualUseFilter is a Filter which can act as an InputFilter or as an OutputFilter, but not as both simultaneously.

DualUseFilters help reduce the number of different Filter types required to implement a particlar filtering algorithm. For example, by implementing basic_regex_filter as a DualUseFilter, the Iostreams library avoids having to define separate templates basic_regex_input_filter and basic_regex_output_filter.

Refinement of

InputFilter, OutputFilter.

Associated Types

Character typeThe type of the characters in the filtered sequences
Category A type convertible to filter_tag and to dual_use
Mode The unique most-derived mode tag to which Category is convertible

Valid Expressions / Semantics

Same as BidirectionalFilter.


Same as BidirectionalFilter.