|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2004-08-30 11:56:32
On Mon, 30 Aug 2004 13:25:51 +0200, Markus Schöpflin wrote
> While trying to make date_time tests compilable on tru64cxx65, I
> have come accross an issue with user defined facets (namely
> date_names_put and all_date_names_put) that leaves me scratching my head.
>
> Is a user defined facet required to be default constructible?
No, in fact I don't think any of the examples are default constructable.
> Or does it need a constructor of the form "foo(size_t refs = 0) :
> locale::facet(refs) {}"?
There should be no requirements ont the constructor. date_names_put is the
base interface while all_date_names_put is an implementation that allows the
passing of a bunch of char arrays to get the desired date output.
> [lib.facets.examples] doesn't say so but most examples I could find
> either have a default constructor or a constructor taking a
> reference count.
I'm not sure where you are seeing these examples, but if you looking in
libs/date_time/test/gregroian/testfacet.cpp I don't think you will find any
default constructors.
Maybe you can send me some of the errors you are getting -- onlist or off --
your choice?
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk