$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-01-26 07:06:10
From: "Brey, Edward D" <EdwardDBrey_at_[hidden]>
> I think a nice feature would be to add a second template parameter
allowing
> the default deleter to be changed on a type basis. This would allow
> creation of a type like shared_cfile, while still allowing heterogeneous
> deleters when desired.
Adding a second template parameter to specify the default deleter is, of
course, trivial. I haven't done this mostly because it goes somewhat against
the "parameterization discourages users" philosophy of the original library.
(I doubt that anyone uses shared_ptr as a template template parameter so
compatibility is not an issue ;-) )
Defining a shared_cfile is not that useful, though. The "deallocator" fclose
is encoded in the type, but the "allocator" fopen is not. It would be easy
to construct a shared_cfile that breaks when destroyed.