Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-03 13:44:52


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk