
3 Feb
2005
3 Feb
'05
6:44 p.m.
Hi Robert, I'd like to use add_facet from serialization in the iostreams library, but I don't understand why the generated locale is dynamically allocated. It would seem be more reusable to declare it as follows: template<typename Facet> inline std::locale add_facet(const std::locale& loc, Facet* facet); If you need a dynamically allocated locale, you could write new std::locale(add_facet(loc, facet)) Jonathan