[Bug c++/113242] g++ rejects-valid template argument of class type containing an lvalue reference

2024-01-18 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113242

Patrick Palka  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |13.3

--- Comment #4 from Patrick Palka  ---
Fixed for GCC 13.3 / 14.

[Bug c++/113242] g++ rejects-valid template argument of class type containing an lvalue reference

2024-01-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113242

--- Comment #3 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Patrick Palka
:

https://gcc.gnu.org/g:4ffb23975b32bfd285915c3d6659b837868b5aa9

commit r13-8235-g4ffb23975b32bfd285915c3d6659b837868b5aa9
Author: Patrick Palka 
Date:   Wed Jan 17 13:01:01 2024 -0500

c++: address of class NTTP object as targ [PR113242]

invalid_tparm_referent_p was rejecting using the address of a class NTTP
object as a template argument, but this should be fine.

PR c++/113242
PR c++/99493

gcc/cp/ChangeLog:

* pt.cc (invalid_tparm_referent_p) : Suppress
DECL_ARTIFICIAL rejection test for class NTTP objects.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/nontype-class61.C: New test.
* g++.dg/cpp2a/nontype-class62.C: New test.

Reviewed-by: Jason Merrill 
(cherry picked from commit 68cea2d32a9fd525154b6a48042e5835d4c5e371)

[Bug c++/113242] g++ rejects-valid template argument of class type containing an lvalue reference

2024-01-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113242

--- Comment #2 from GCC Commits  ---
The master branch has been updated by Patrick Palka :

https://gcc.gnu.org/g:68cea2d32a9fd525154b6a48042e5835d4c5e371

commit r14-8189-g68cea2d32a9fd525154b6a48042e5835d4c5e371
Author: Patrick Palka 
Date:   Wed Jan 17 13:01:01 2024 -0500

c++: address of class NTTP object as targ [PR113242]

invalid_tparm_referent_p was rejecting using the address of a class NTTP
object as a template argument, but this should be fine.

PR c++/113242
PR c++/99493

gcc/cp/ChangeLog:

* pt.cc (invalid_tparm_referent_p) : Suppress
DECL_ARTIFICIAL rejection test for class NTTP objects.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/nontype-class61.C: New test.
* g++.dg/cpp2a/nontype-class62.C: New test.

Reviewed-by: Jason Merrill 

[Bug c++/113242] g++ rejects-valid template argument of class type containing an lvalue reference

2024-01-05 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113242

Patrick Palka  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-01-05
   Assignee|unassigned at gcc dot gnu.org  |ppalka at gcc dot 
gnu.org
 CC||ppalka at gcc dot gnu.org
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Patrick Palka  ---
Confirmed, this never worked.