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


2865. Regression on result of conditional operator

Section:7.6.16  [expr.cond]    Status:CD7    Submitter:Christof Meerwald    Date:2024-01-14

[Accepted as a DR at the June, 2024 meeting.]

Consider:

  #include <concepts>  template <class T> T get();  template <class T>  using X = decltype(true ? get<T const&>() : get<T>());  struct C { };  static_assert(std::same_as<X<int>, int>);  static_assert(std::same_as<X<C>, C const>);  // #1

BeforeIssue 1895, #1 was well-formed.With the reformulation based on conversion sequences, #1 is nowill-formed because both conversion sequences can be formed.

Proposed resolution (approved by CWG 2024-05-03):

Change in 7.6.16 [expr.cond] bullet 4.3 as follows:




[8]ページ先頭

©2009-2026 Movatter.jp