Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice5.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/78337 // { dg-do compile { target c++14 } } struct X { static constexpr int foo (int b) { return b; } }; template<int> using Void = void; template<typename F,typename A> auto bar(F f, A a) -> decltype( ( f(a) , 0 ) ) // { dg-message "" } { return {}; } int main() { //constexpr int f = 3; (void)f; auto l = [](auto of_type_X)-> Void<(decltype(of_type_X)::foo(f), 0)> // { dg-error "variable" } {return;}; bar(l , X{}); // { dg-error "no match" } }