Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nontype-class62.C

raw
1 // PR c++/99493
2 // { dg-do compile { target c++20 } }
3
4 struct owner{int m;};
5 struct view{const int*m;constexpr view(const owner&o):m{&o.m}{}};
6 template<view V>struct constant{};
7 template<owner O>constexpr constant<O>v{};
8 constexpr auto a=v<owner{}>;