This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH to constexpr array decay handling


Recent discussion on the C++ committee core language list pointed out
that we were wrongly rejecting use of an array variable as a template
argument for a pointer parameter, because we were asking whether the
array is constant.  This patch corrects that check to consider the
address of the array rather than its value.

The second part of the patch implements the C++17 change that no
longer requires a pointer non-template argument to point to a variable
with linkage.

Tested x86_64-pc-linux-gnu, applying to trunk and 7.

Attachment: cx-array.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]