Topic: Defect Report: redundant type cast in [lib.allocator.members] par13
Author: "Markus Mauhart" <markus.mauhart@nospamm.chello.at>
Date: 28 Feb 03 14:22:49 GMT Raw View
[Moderator's note: this defect report has been
forwarded to the C++ committee. -moderator.]
[lib.allocator.members], 20.4.1.1 allocator members, contains
the following 3 lines:
12 Returns: new((void *) p) T( val)
void destroy(pointer p);
13 Returns: ((T*) p)->~T()
The type cast "(T*) p" in the last line is redundant cause
we know that std::allocator<T>::pointer is a typedef for T*.
Therefore I think that "((T*) p)" should be replaced with "p".
---
[ 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 ]