A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue400 below:

redundant type cast in lib.allocator.members

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

400. redundant type cast in lib.allocator.members

Section: 20.2.10.2 [allocator.members] Status: CD1 Submitter: Markus Mauhart Opened: 2003-02-27 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [allocator.members].

View all issues with CD1 status.

Discussion:

20.2.10.2 [allocator.members] 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*.

Proposed resolution:

Replace "((T*) p)" with "p".

Rationale:

Just a typo, this is really editorial.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4