Skip to content

Commit ad4cfc4

Browse files
Collect pending Changes entries for 2026-11-06 []
1 parent b568216 commit ad4cfc4

4 files changed

Lines changed: 65 additions & 59 deletions

File tree

‎src/Changes‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,70 @@
11
Version 7.1
22

3+
11/6/26 [GH #370]
4+
C++26: comparison between two arrays is not allowed
5+
6+
A comparison between two arrays using an equality or relational operator is
7+
deprecated in C++20 and not allowed in C++26 (P2865). The front end did not
8+
diagnose it. It is now a warning in C++20 and C++23, and an error in C++26
9+
(only a warning when emulating GCC versions before 15 or Clang versions before
10+
20, which do the same). Before C++20 it is a remark (a warning when
11+
emulating Clang 20 or later, which warns by default). This includes class
12+
operands that are converted to arrays by a conversion function. For
13+
example, with --c++26:
14+
15+
int a[2], b[2];
16+
bool x = a == b; // Now an error.
17+
bool y = a == &b[0]; // Okay: one operand is a pointer.
18+
struct C { using A = int[2]; operator A &() const; } c;
19+
bool z = c == c; // Now an error.
20+
21+
22+
11/6/26 [GH #484]
23+
Lookup in default template arguments during partial specialization rescans
24+
25+
When a template argument list was checked during the rescan of a partial
26+
specialization (e.g., when matching a partial specialization that uses
27+
void_t), a default template argument of a class or variable template
28+
named in that list was substituted in the context of the partial
29+
specialization rather than that of the class or variable template. Names
30+
declared after the partial specialization but before the class or variable
31+
template were therefore not found, and the substitution was wrongly
32+
considered to fail. (This only occurred when dependent name processing was
33+
done, so Microsoft permissive mode was not affected unless --dep_name was
34+
specified.) That is now fixed. For example, with --c++17:
35+
36+
template<class...> using void_t = void;
37+
template<class, template<class...> class TT, class... P>
38+
constexpr bool ok_impl = false;
39+
template<template<class...> class TT, class... P>
40+
constexpr bool ok_impl<void_t<TT<P...>>, TT, P...> = true;
41+
namespace lib { template<class T> T&& declval() noexcept; }
42+
template<class T, class = decltype(&lib::declval<T&>())> struct A {};
43+
struct V {};
44+
static_assert(ok_impl<void, A, V>, ""); // Previously failed.
45+
46+
47+
11/6/26 [GH #489]
48+
Template-dependent variable template-ids in C++03 constant expressions
49+
50+
In C++03 GNU and Clang modes, where variable templates are accepted as an
51+
extension, a variable template-id with template-dependent template arguments
52+
was rejected as nonconstant where a constant expression is required (e.g., as
53+
a template argument, an array bound, or an enumerator value). That is now
54+
fixed. Such a reference to a constant variable template is treated as a
55+
value-dependent constant, and its value is checked when the template is
56+
instantiated. For example, with --g++ --c++03:
57+
58+
template <class T> const bool is_fp = false;
59+
template <> const bool is_fp<float> = true;
60+
template <bool B> struct integral_constant {
61+
static const bool value = B;
62+
};
63+
template <class T>
64+
struct is_floating_point
65+
: integral_constant<is_fp<T> > {}; // Previously an error.
66+
67+
368
11/4/26 [GH #224]
469
Constant evaluation of GNU vector objects
570

‎src/pending_changes/gh-370-array-comparisons.txt‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎src/pending_changes/gh-484-default-arg-lookup-in-partial-spec-rescan.txt‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎src/pending_changes/gh-489-var-tmpl-const.txt‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)