Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-02-03 15:39:34

add_facet got added to address a short-coming of the older dinkumware
library. It would not really be needed except for this.

As to why I did it they way I did - I don't remember. I would guess that I
didn't want any more copying than necessary and this implementation worked
fine for me.

If you want to make version similar to that which you propose and put it an
agreed upon public place, I can eventually included your more generally
usual formulation

Robert Ramey

Jonathan Turkanis wrote:
> 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
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at