re PR c++/82022 (constexpr lambda in template context: expression ‘<lambda>’ is not a constant expression)
2018-03-05 Paolo Carlini <paolo.carlini@oracle.com> PR c++/82022 * g++.dg/cpp1z/constexpr-lambda20.C: New. From-SVN: r258241
This commit is contained in:
parent
e095eec19a
commit
a0445a5fb1
@ -1,3 +1,8 @@
|
||||
2018-03-05 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/82022
|
||||
* g++.dg/cpp1z/constexpr-lambda20.C: New.
|
||||
|
||||
2018-03-03 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
PR fortran/71085
|
||||
|
16
gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C
Normal file
16
gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C
Normal file
@ -0,0 +1,16 @@
|
||||
// PR c++/82022
|
||||
// { dg-options -std=c++17 }
|
||||
|
||||
template <class T>
|
||||
void f2()
|
||||
{
|
||||
constexpr bool r = []() constexpr { return false; }();
|
||||
if constexpr (r);
|
||||
if constexpr ([]() constexpr { return false; }());
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
if constexpr ([]() constexpr { return false; }());
|
||||
f2<int>();
|
||||
}
|
Loading…
Reference in New Issue
Block a user