This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
time_put facet implementation
- From: Sam Varshavchik <mrsam at courier-mta dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 26 Sep 2009 12:13:54 -0400
- Subject: time_put facet implementation
I get a bad cast failure trying to instantiate
std::use_facet<std::time_put<char, std::ostream_iterator<char> > >
This facet does not seem to be implemented in libstdc++ 4.3.2.
It looks like only std::ostreambuf_iterator-based facets are implemented in
libstdc++, and not std::ostream_iterator-based facets.
I'm looking at table 52 in 2.1.1.1, "Required Instantiation". I see that
"time_put<char, OutputIterator>" is listed as a required facet. Following
it, paragraph 6 specifies that OutputIterator may be anything that specifies
an output iterator that meets the requirements of 24.1. As far as I can
figure out, std::ostream_iterator meets those requirements, so how come I
cannot instantiate this facet? I think I should be able to use any iterator,
not just std::ostreambuf_iterator, and not even just std::ostream_iterator,
with all of the output iterator facets in this table.
Attachment:
pgp00000.pgp
Description: PGP signature