[Bug c++/87327] [8 Regression] Calling member functions on captured constexpr variables "is not a constant expression"

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87327

Andrew Pinski  changed:

   What|Removed |Added

 CC||rcc.dark at gmail dot com

--- Comment #7 from Andrew Pinski  ---
*** Bug 89643 has been marked as a duplicate of this bug. ***

[Bug c++/87327] [8 Regression] Calling member functions on captured constexpr variables "is not a constant expression"

2020-02-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87327

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jason Merrill  ---
Fixed for 8.4.

[Bug c++/87327] [8 Regression] Calling member functions on captured constexpr variables "is not a constant expression"

2020-02-25 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87327

--- Comment #5 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:6470e8caa2bd331fb6e21524d6c14662531cfa9b

commit r8-10072-g6470e8caa2bd331fb6e21524d6c14662531cfa9b
Author: Jason Merrill 
Date:   Tue Feb 25 21:29:03 2020 -0500

PR c++/86429 - constexpr variable in lambda.

When we refer to a captured variable from a constant-expression context
inside a lambda, the closure (like any function parameter) is not constant
because we aren't in a call, so we don't have an argument.  So the capture
is non-constant.  But if the captured variable is constant, we might be
able
to use it directly in constexpr evaluation.

gcc/cp/ChangeLog
2020-02-25  Jason Merrill  

PR c++/86429 - constexpr variable in lambda.
PR c++/82643
PR c++/87327
* constexpr.c (cxx_eval_constant_expression): In a lambda function,
try evaluating the captured variable directly.

[Bug c++/87327] [8 Regression] Calling member functions on captured constexpr variables "is not a constant expression"

2019-03-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87327

Jason Merrill  changed:

   What|Removed |Added

Summary|[8/9 Regression] Calling|[8 Regression] Calling
   |member functions on |member functions on
   |captured constexpr  |captured constexpr
   |variables "is not a |variables "is not a
   |constant expression"|constant expression"

--- Comment #4 from Jason Merrill  ---
Fixed on trunk.