Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


2206. Composite type of object and function pointers

Section:Clause 7  [expr]    Status:C++17    Submitter:Mike Miller    Date:2015-12-01

[Adopted at the February/March, 2017 meeting.]

Consider an example like

  void *p;  void (*pf)();  auto x = true ? p : pf;

The rules in Clause 7 [expr] paragraph 13 say that the compositetype between avoid* and a function pointer type isvoid*. This is surprising, since a function pointer typecannot be implicitly converted tovoid*.

Proposed resolution (January, 2017):

Change Clause 7 [expr] bullet 14.5 as follows:

Thecv-combined type of two typesT1 andT2 isa typeT3 similar toT1 whose cv-qualification signature(7.3.6 [conv.qual]) is:




[8]ページ先頭

©2009-2026 Movatter.jp