|
Boost Users : |
From: Chad Walters (chad_at_[hidden])
Date: 2007-05-22 14:51:51
I was looking through the iostreams sources and came across this in
boost/iostreams/concepts.hpp:
//------Definitions of helper templates for multi-character filter
cncepts----//
template<typename Mode, typename Ch = char>
struct multichar_filter : filter<Mode, Ch> {
struct category : filter<Mode, Ch>::category, multichar_tag { };
};
template<typename Mode, typename Ch = wchar_t>
struct multichar_wfilter : multichar_filter<Mode, Ch> { };
typedef multichar_filter<input> multichar_input_filter;
typedef multichar_filter<input> multichar_input_wfilter;
typedef multichar_filter<output> multichar_output_filter;
typedef multichar_filter<output> multichar_output_wfilter;
typedef multichar_filter<dual_use> multichar_dual_use_filter;
typedef multichar_filter<dual_use> multichar_dual_use_wfilter;
//--------------------------------------------------------------------------
--//
It seems to me that the wide versions of these typedefs should be defined
using multichar_wfilter, making the typedefs appear as follows:
typedef multichar_filter<input> multichar_input_filter;
typedef multichar_wfilter<input> multichar_input_wfilter;
typedef multichar_filter<output> multichar_output_filter;
typedef multichar_wfilter<output> multichar_output_wfilter;
typedef multichar_filter<dual_use> multichar_dual_use_filter;
typedef multichar_wfilter<dual_use> multichar_dual_use_wfilter;
Also, the default arguments in multichar_filter and multichar_wfilter
termplates aren't wrapped in BOOST_IOSTREAMS_DEFAULT_ARG(), unlike the other
ones in this file. Seems like they should be, for consistency if nothing
else.
Chad
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net