time_put facet implementation

Sam Varshavchik mrsam@courier-mta.com
Sat Sep 26 16:14:00 GMT 2009


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.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20090926/7a884808/attachment.sig>


More information about the Libstdc++ mailing list