A RetroSearch Logo

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

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/2865.html below:

CWG Issue 2865

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

2025-08-11

2865. Regression on result of conditional operatorSection: 7.6.16  [expr.cond]     Status: DRWP     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

Before Issue 1895, #1 was well-formed. With the reformulation based on conversion sequences, #1 is now ill-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:


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