Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/nontype-auto19.C

raw
1 // Verify top-level cv-qualifiers are dropped from the deduced
2 // type of a non-type template parameter, as per [temp.param]/6.
3 // { dg-do compile { target c++17 } }
4
5 constexpr int x = 42;
6 template<decltype(auto) V> decltype(V)& f();
7 using type = decltype(f<x>());
8 using type = int&;