This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]