 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Axter Guest
|
Posted: Sat Oct 08, 2005 3:12 am Post subject: Status of adding Policy Based Smart Pointer to the standard |
|
|
What is the status of adding Policy Based Smart Pointer to the
standard?
Is it still under consideration?
Is there specific example implementation that they're looking at?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Lance Diduck Guest
|
Posted: Sun Oct 09, 2005 4:28 am Post subject: Re: Status of adding Policy Based Smart Pointer to the stand |
|
|
I don't know of any such proposal. There are a number of
implementations out there, notably Alexandrescu's. I hope to publicly
deploy one that meets the tr1 interface, where the different policy
versions pass the same tests that at least the boost implementation
does. This is different than just doing a typedef like typedef
basic_string<char,char_traits string; But
there are ways to achieve it. For example
template<class shared_ptrT, class sharedptrA > >
class basic_shared_ptr{
//...
};
//the impl that meets the standard
template<class shared_ptrT>
struct shared_ptr:basic_shared_ptr<shared_ptrT,
detail::shared_count
//a version boosted from boost, and allocatorized
| Quote: | {
//constructors as necessary, plus other details |
};
Another way is by a factory function, overloaded on T and D. That
worked, but was far harder to test and understand. I chunked it.
There are a number of non design challenges in making such a reference
version, least of all copyright, build testers, porting to a number of
platforms, etc. But however it is done, the implementation policy
properties would need some time to stabilize even before a proposal is
made. I do have prototypes in use at my day job, ported to Sun WS and
vacpp, and MSVC. These are in library format.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|