Topic: You gotta redefine the whole thing!


Author: "J Donner" <jdonner@schedsys.com>
Date: 1998/10/20
Raw View
  The way you've written it, your specialization has nothing!
Not even a constructor.  Because it's private, you've got to
redefine Everything you want it to have.  Even if you derived it
as public, you have to redefine all the functionality that you
want to have implemented with void *.  See the example in
Stroustrup 3d, pg 342.

  Incidentally, I asked SGI why they didn't supply a specialization
for pointers that all used void * (like you're trying to do) and they
were kind enough to reply and said it was because the casts
involved block many compiler optimizations.  Though, that they
were still considering it, waiting for experience with whether space
or speed was more important.  Maybe they could let the user
#define something, to choose...
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html              ]